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