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