summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-07-05 12:01:40 -0400
committerGreg Hudson <ghudson@mit.edu>2014-07-08 19:19:31 -0400
commit7ecf85644d8ef616781e6689a8dd504316cb6d7a (patch)
treeb2bd70f1d31a2076450d9a8592f6c1be42cbc9b7
parent02a1123cf44381690c28f18ab2c4ba8036200539 (diff)
downloadkrb5-7ecf85644d8ef616781e6689a8dd504316cb6d7a.tar.gz
krb5-7ecf85644d8ef616781e6689a8dd504316cb6d7a.tar.xz
krb5-7ecf85644d8ef616781e6689a8dd504316cb6d7a.zip
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
-rw-r--r--src/aclocal.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index a0d1bf173..ff444ee8c 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