From: Greg Hudson Date: Sat, 5 Jul 2014 16:01:40 +0000 (-0400) Subject: Define _GNU_SOURCE for glibc extensions X-Git-Tag: krb5-1.13-alpha1~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ecf85644d8ef616781e6689a8dd504316cb6d7a;p=thirdparty%2Fkrb5.git Define _GNU_SOURCE for glibc extensions 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 --- diff --git a/src/aclocal.m4 b/src/aclocal.m4 index a0d1bf1738..ff444ee8c7 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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