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