]> granicus.if.org Git - sudo/commitdiff
We need to include OSDEFS in CFLAGS when doing the utmp/utmpx
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 30 Mar 2011 14:14:25 +0000 (10:14 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 30 Mar 2011 14:14:25 +0000 (10:14 -0400)
structure checks for glibc which only has __e_termination visible
when _GNU_SOURCE is *not* defined.

configure
configure.in

index 30bce2c7e6d89c5f5cff18eb2599670d605e1450..4ea51167037f74e50cd41b33351cb2881f12ef34 100755 (executable)
--- a/configure
+++ b/configure
@@ -15050,6 +15050,8 @@ $as_echo "#define HAVE_SA_LEN 1" >>confdefs.h
 fi
 
 
+_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $OSDEFS"
 if test $ac_cv_header_utmpx_h = "yes"; then
     ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_id" "ac_cv_member_struct_utmpx_ut_id" "
        #include <sys/types.h>
@@ -15238,6 +15240,7 @@ fi
 fi
 
 fi
+CFLAGS="$_CFLAGS"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
 $as_echo_n "checking type of array argument to getgroups... " >&6; }
index 35c8bf1276b39f680f4d0b6ff745c0dc52dd1e89..b5c1d22cfe417e25fda331efb5e2caa1fe2107c7 100644 (file)
@@ -1965,7 +1965,11 @@ SUDO_UID_T_LEN
 SUDO_SOCK_SA_LEN
 dnl
 dnl Check for utmp/utmpx struct members.
+dnl We need to include OSDEFS for glibc which only has __e_termination
+dnl visible when _GNU_SOURCE is *not* defined.
 dnl
+_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $OSDEFS"
 if test $ac_cv_header_utmpx_h = "yes"; then
     AC_CHECK_MEMBERS([struct utmpx.ut_id, struct utmpx.ut_pid, struct utmpx.ut_tv, struct utmpx.ut_type], [], [], [
        #include <sys/types.h>
@@ -2001,6 +2005,7 @@ else
        #include <utmp.h>
     ])
 fi
+CFLAGS="$_CFLAGS"
 
 dnl
 dnl Function checks