]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Define _GNU_SOURCE for glibc extensions
authorGreg Hudson <ghudson@mit.edu>
Sat, 5 Jul 2014 16:01:40 +0000 (12:01 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 8 Jul 2014 23:19:31 +0000 (19:19 -0400)
glibc does not declare a number of common, useful extensions such as
asprintf unless _GNU_SOURCE is defined.  Define it early in the
configure process so that it is available for autoconf tests.

Defining _GNU_SOURCE unfortunately causes glibc to use the non-POSIX
version of strerror_r, which we now handle using the k5-platform.h
wrapper.

ticket: 7961

src/aclocal.m4

index a0d1bf1738f052b38aa47082bd5d8962baa8bb4f..ff444ee8c701c73966b3b9e5e4485d369c8448ec 100644 (file)
@@ -50,6 +50,9 @@ AC_DEFUN(CONFIG_RULES,[dnl
 AC_REQUIRE([V5_SET_TOPDIR]) dnl
 EXTRA_FILES=""
 AC_SUBST(EXTRA_FILES)
+dnl Consider using AC_USE_SYSTEM_EXTENSIONS when we require autoconf
+dnl 2.59c or later, but be sure to test on Solaris first.
+AC_DEFINE([_GNU_SOURCE], 1, [Define to enable extensions in glibc])
 WITH_CC dnl
 AC_REQUIRE_CPP
 if test -z "$LD" ; then LD=$CC; fi