You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.3 KiB

  1. --- a/lib/replace/wscript
  2. +++ b/lib/replace/wscript
  3. @@ -416,22 +416,13 @@
  4. conf.CHECK_FUNCS('prctl dirname basename')
  5. - strlcpy_in_bsd = False
  6. + # Not checking for libbsd
  7. + conf.CHECK_FUNCS('strlcpy strlcat')
  8. + conf.CHECK_FUNCS('getpeereid')
  9. + conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
  10. + conf.CHECK_FUNCS('setproctitle_init')
  11. - # libbsd on some platforms provides strlcpy and strlcat
  12. - if not conf.CHECK_FUNCS('strlcpy strlcat'):
  13. - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
  14. - checklibc=True):
  15. - strlcpy_in_bsd = True
  16. - if not conf.CHECK_FUNCS('getpeereid'):
  17. - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
  18. - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
  19. - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
  20. - if not conf.CHECK_FUNCS('setproctitle_init'):
  21. - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
  22. -
  23. - if not conf.CHECK_FUNCS('closefrom'):
  24. - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
  25. + conf.CHECK_FUNCS('closefrom')
  26. conf.CHECK_CODE('''
  27. struct ucred cred;
  28. @@ -808,9 +799,6 @@
  29. # look for a method of finding the list of network interfaces
  30. for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
  31. - bsd_for_strlcpy = ''
  32. - if strlcpy_in_bsd:
  33. - bsd_for_strlcpy = ' bsd'
  34. if conf.CHECK_CODE('''
  35. #define %s 1
  36. #define NO_CONFIG_H 1
  37. @@ -823,7 +811,7 @@
  38. #include "tests/getifaddrs.c"
  39. ''' % method,
  40. method,
  41. - lib='nsl socket' + bsd_for_strlcpy,
  42. + lib='nsl socket',
  43. addmain=False,
  44. execute=True):
  45. break
  46. @@ -871,7 +859,6 @@
  47. break
  48. extra_libs = ''
  49. - if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
  50. if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
  51. if bld.CONFIG_SET('REPLACE_REQUIRES_LIBSOCKET_LIBNSL'): extra_libs += ' socket nsl'