summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/replace/libreplace.m47
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index 52e1b5fe1d..8b1486c5c1 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -24,6 +24,12 @@ AC_PROG_CC_C99
AC_C_INLINE
AC_PROG_INSTALL
+AH_VERBATIM([_XOPEN_SOURCE],
+[/* Enable XOPEN on systems that have them. */
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 1
+#endif])
+
AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],
[/* Enable XOPEN extensions on systems that have them. */
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -113,7 +119,6 @@ AC_INCLUDES_DEFAULT
#endif]
)
-
AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[
AC_TRY_RUN([#include "$libreplacedir/test/shared_mmap.c"],
samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)])