0001-libreplace-disable-libbsd-support.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 4df82c9e03b68dc1621fe4c9ac6a29ae3e64e07e Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Wed, 7 Sep 2016 23:03:43 -0300
  4. Subject: [PATCH] libreplace: disable libbsd support
  5. Disable libbsd support, samba4 uses a global config.h for its own
  6. codebase and that of heimdal (when building with builtin).
  7. This causes redefinition conflicts for link(2) when both standard
  8. unistd.h and bsd/unistd.h get included.
  9. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  10. [Bernd: rebased for versions 4.7.3, 4.8.0, 4.8.5 & 4.11.13]
  11. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  12. ---
  13. lib/replace/wscript | 15 ---------------
  14. 1 file changed, 15 deletions(-)
  15. diff --git a/lib/replace/wscript b/lib/replace/wscript
  16. index 240d730cbee..c6d8df43c74 100644
  17. --- a/lib/replace/wscript
  18. +++ b/lib/replace/wscript
  19. @@ -436,21 +436,6 @@ def configure(conf):
  20. strlcpy_in_bsd = False
  21. - # libbsd on some platforms provides strlcpy and strlcat
  22. - if not conf.CHECK_FUNCS('strlcpy strlcat'):
  23. - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
  24. - checklibc=True):
  25. - strlcpy_in_bsd = True
  26. - if not conf.CHECK_FUNCS('getpeereid'):
  27. - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
  28. - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
  29. - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
  30. - if not conf.CHECK_FUNCS('setproctitle_init'):
  31. - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
  32. -
  33. - if not conf.CHECK_FUNCS('closefrom'):
  34. - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
  35. -
  36. conf.CHECK_CODE('''
  37. struct ucred cred;
  38. socklen_t cred_len;
  39. --
  40. 2.20.1