summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/roken.h8
-rw-r--r--source4/heimdal_build/wscript_build1
-rwxr-xr-xsource4/heimdal_build/wscript_configure7
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h
index b762545535..9752c04a74 100644
--- a/source4/heimdal_build/roken.h
+++ b/source4/heimdal_build/roken.h
@@ -123,14 +123,6 @@
#define HAVE_SETEUID
#endif
-/* force the use of the libreplace strerror_r */
-#ifndef HAVE_STRERROR_R
-#define HAVE_STRERROR_R
-#endif
-#ifndef STRERROR_R_PROTO_COMPATIBLE
-#define STRERROR_R_PROTO_COMPATIBLE
-#endif
-
#ifndef HAVE_DIRFD
#ifdef HAVE_DIR_DD_FD
#define dirfd(x) ((x)->dd_fd)
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index f4837ace1b..f4471159eb 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -408,6 +408,7 @@ 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 168be6d0e4..2bb465a1fd 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -28,6 +28,13 @@ 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