diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-08-26 18:42:06 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-08-26 18:42:06 +0400 |
commit | 75c76162ab1a60717ef9665cfb9d8ce0bc6d39b1 (patch) | |
tree | 866c6983f8b7f738f454a5bafd2e5d7f482de8d9 /configure.ac | |
parent | ea2791432d8fdea62b640eec5e52e2a3280efa8c (diff) | |
download | emacs-75c76162ab1a60717ef9665cfb9d8ce0bc6d39b1.tar.gz |
* configure.ac (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d6476d2e1c7..4f22be4745d 100644 --- a/configure.ac +++ b/configure.ac @@ -1526,10 +1526,15 @@ if test $emacs_cv_personality_linux32 = yes; then [Define to 1 if personality LINUX32 can be set.]) fi +# Note that Solaris has sys/sysinfo.h which defines struct +# sysinfo as well. To make sure that we're using GNU/Linux +# sysinfo, we explicitly set one of its fields. if test "$ac_cv_header_sys_sysinfo_h" = yes; then AC_MSG_CHECKING([if Linux sysinfo may be used]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]], - [[struct sysinfo si; sysinfo (&si)]])], + [[struct sysinfo si; + si.totalram = 0; + sysinfo (&si)]])], emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no) AC_MSG_RESULT($emacs_cv_linux_sysinfo) if test $emacs_cv_linux_sysinfo = yes; then |