summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2017-06-01 13:26:38 +1200
committerJeremy Allison <jra@samba.org>2017-06-13 18:38:14 +0200
commit378ae342c4e2e6b5bafbe54067d35344746be41b (patch)
treec6d07db14d53436d1adfd15e4ad61b04570d1855 /source4/heimdal_build
parent40cc7a1eb339cf45d2b3e121832a89f61dd1776f (diff)
downloadsamba-378ae342c4e2e6b5bafbe54067d35344746be41b.tar.gz
strerror_r: provide XSI-compliant strerror_r
Provide a XSI-compliant strerror_r on GNU based systems. The default GNU strerror_r is not XSI-compliant, this patch wraps the GNU-specific call in an XSI-compliant wrapper. This reverts 18ed32ce0821d11c0c06d82c07ba1c27b0c2b886 which tried to make Heimdal use roken, rather than libreplace for strerror_r. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/config.h3
-rw-r--r--source4/heimdal_build/wscript_build1
-rw-r--r--source4/heimdal_build/wscript_configure7
3 files changed, 3 insertions, 8 deletions
diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h
index 2d113ae543f..a7669227960 100644
--- a/source4/heimdal_build/config.h
+++ b/source4/heimdal_build/config.h
@@ -49,4 +49,7 @@
/* heimdal now wants some atomic ops - ask for the non-atomic ones for Samba */
#define HEIM_BASE_NON_ATOMIC 1
+/* lib/replace provides an XSI Compatable strerror_r so use that */
+#define STRERROR_R_PROTO_COMPATIBLE
+
#endif
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index c733b8f5583..2072be42e7d 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -408,7 +408,6 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
lib/roken/resolve.c
lib/roken/socket.c
lib/roken/roken_gethostby.c
- lib/roken/strerror_r.c
'''
HEIMDAL_LIBRARY('roken',
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 67ac34b45b2..354d44fbf36 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -28,13 +28,6 @@ conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
strptime strsep strsep_copy strtok_r strupr swab umask uname unsetenv
closefrom err warn errx warnx flock writev''')
-if conf.CHECK_FUNCS('strerror_r'):
- # Check if strerror_r is BSD compatible (default GNU implementation is not what Heimdal expects)
- conf.CHECK_CODE('int strerror_r(int errnum, char *buf, size_t buflen);',
- 'STRERROR_R_PROTO_COMPATIBLE',
- headers='string.h', addmain=False, link=False,
- msg="Checking for XSI (rather than GNU) prototype for strerror_r")
-
conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
sethostent endhostent getipnodebyaddr freehostent gethostbyname