r4799: comparison_fn_t is under __USE_GNU on GNU systems, therefore, we need _GNU_SOU...
authorAlexander Bokovoy <ab@samba.org>
Mon, 17 Jan 2005 09:32:11 +0000 (09:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:08:57 +0000 (13:08 -0500)
(This used to be commit b4200a462354cb605eb6af41427027147798de6e)

source4/build/m4/rewrite.m4

index c906af8b107610c6bf484d0fff456fce3447d5b3..268b07b2976d983a43f3797d50fabe84484b054d 100644 (file)
@@ -971,6 +971,11 @@ fi
 # Check for comparison_fn_t
 AC_CACHE_CHECK([for comparison_fn_t],samba_cv_HAVE_COMPARISON_FN_T,[
 AC_TRY_COMPILE([
+/* Enable GNU extensions on systems that have them */
+/* as comparison_fn_t is defined under __USE_GNU on these */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
 #include <stdlib.h>
 int list_find(const void *needle, 
              const void *base, size_t nmemb, size_t size, comparison_fn_t comp_fn)