From dbe1e4a5a679295a1eeb1dc4b1d56acd0d3614d7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 5 Mar 2012 06:04:14 +0000 Subject: libgo: Fix Solaris ustat.h test. From-SVN: r184913 --- libgo/configure | 5 ++++- libgo/configure.ac | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'libgo') diff --git a/libgo/configure b/libgo/configure index 128629f..d1c17f1 100755 --- a/libgo/configure +++ b/libgo/configure @@ -14547,7 +14547,9 @@ $as_echo_n "checking whether can be used... " >&6; } if test "${libgo_cv_c_ustat_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + CFLAGS_hold=$CFLAGS +CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -14563,6 +14565,7 @@ else libgo_cv_c_ustat_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS=$CFLAGS_hold fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_c_ustat_h" >&5 $as_echo "$libgo_cv_c_ustat_h" >&6; } diff --git a/libgo/configure.ac b/libgo/configure.ac index 8100c1c..63c5faf 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -463,6 +463,8 @@ AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [], AC_CACHE_CHECK([whether can be used], [libgo_cv_c_ustat_h], +[CFLAGS_hold=$CFLAGS +CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS" AC_COMPILE_IFELSE( [AC_LANG_SOURCE([ #include @@ -470,7 +472,8 @@ AC_COMPILE_IFELSE( #include #endif #include -])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no])) +])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no]) +CFLAGS=$CFLAGS_hold]) if test $libgo_cv_c_ustat_h = yes; then AC_DEFINE(HAVE_USTAT_H, 1, [Define to 1 if you have the header file and it works.]) -- cgit v1.1