summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-04 18:18:53 +0000
committerGerald Carter <jerry@samba.org>2007-05-04 18:18:53 +0000
commit51217c2f03cc23c312511b3a0670f634f284b069 (patch)
tree26e376365f5154f19261b0b8b0292a1245985c63
parent0c7cbf0b4b65c20f633ad7f4db2fba9a6bcb040c (diff)
downloadsamba-51217c2f03cc23c312511b3a0670f634f284b069.tar.gz
r22671: merge metze's change in svn r22660
-rw-r--r--source/lib/replace/autoconf-2.60.m413
-rw-r--r--source/lib/replace/test/testsuite.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/source/lib/replace/autoconf-2.60.m4 b/source/lib/replace/autoconf-2.60.m4
index 5360fff5d24..acdcd38efe6 100644
--- a/source/lib/replace/autoconf-2.60.m4
+++ b/source/lib/replace/autoconf-2.60.m4
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --------------
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
# --------------------------------------------------------------
diff --git a/source/lib/replace/test/testsuite.c b/source/lib/replace/test/testsuite.c
index 2d068c559f3..54ffd6a66de 100644
--- a/source/lib/replace/test/testsuite.c
+++ b/source/lib/replace/test/testsuite.c
@@ -511,7 +511,7 @@ static int test_inet_ntoa(void)
"\tptr: %p - %p = %d != %d\n" \
"]\n", \
__STRING(func), __location__, __STRING(func), \
- str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), diff); \
+ str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - _p)), diff); \
return false; \
} \
} while (0)