summaryrefslogtreecommitdiff
path: root/source4/build/m4/rewrite.m4
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/m4/rewrite.m4')
-rw-r--r--source4/build/m4/rewrite.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index a6addcf91a..8f90e3a916 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -9,6 +9,15 @@ AC_SUBST(SONAMEFLAG)
AC_SUBST(PICFLAG)
AC_DEFINE([_GNU_SOURCE],[],[Pull in GNU extensions])
+
+# The definition of _GNU_SOURCE potentially causes a change of the value
+# of _XOPEN_SOURCE. So define it only conditionally.
+AH_VERBATIM([_XOPEN_SOURCE],
+[/* Define on UNIX to activate XPG/5 features. */
+#if !defined(_XOPEN_SOURCE)
+# define _XOPEN_SOURCE 500
+#endif])
+
AC_SYS_LARGEFILE
#