From ea562e44017a264f9b05f311973ff51d56880935 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 28 Jun 2001 17:44:53 +0000 Subject: [PATCH] Properly set _GNU_SOURCE on linux --- lib/bind/configure.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/bind/configure.in b/lib/bind/configure.in index 1f5dff0482..25e83efa48 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -19,7 +19,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.57 $) +AC_REVISION($Revision: 1.58 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -184,9 +184,6 @@ if test "X$CC" = "X" ; then *-hp-hpux*) CC="cc" ;; - *linux*) - CC="gcc -D_GNU_SOURCE" - ;; mips-sgi-irix*) CC="cc" ;; @@ -663,6 +660,16 @@ MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>&1 | awk '"'"'BEGIN {colon=0; rec="";} esac fi +# +# _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which +# is supposed to be opaque. +# +case $host in + *linux*) + STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE" + ;; +esac + AC_SUBST(MKDEPCC) AC_SUBST(MKDEPCFLAGS) AC_SUBST(MKDEPPROG)