From 9815806f16441004b87b11e3c0bbc190e9011044 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 11 Aug 2016 08:34:21 +0200 Subject: [PATCH] configure: Explicitly check for sysinfo function. Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- configure | 1 + configure.ac | 1 + dlls/ntdll/virtual.c | 4 ++-- include/config.h.in | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b8eedc57c61..bf4d1a79391 100755 --- a/configure +++ b/configure @@ -15133,6 +15133,7 @@ for ac_func in \ strtoll \ strtoull \ symlink \ + sysinfo \ tcdrain \ thr_kill2 \ timegm \ diff --git a/configure.ac b/configure.ac index f5dde047269..0fad32f96ff 100644 --- a/configure.ac +++ b/configure.ac @@ -2039,6 +2039,7 @@ AC_CHECK_FUNCS(\ strtoll \ strtoull \ symlink \ + sysinfo \ tcdrain \ thr_kill2 \ timegm \ diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 1312c8bf44f..e826fa03c0c 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1359,7 +1359,7 @@ void virtual_init_threading(void) */ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) { -#ifdef HAVE_SYS_SYSINFO_H +#ifdef HAVE_SYSINFO struct sysinfo sinfo; #endif @@ -1368,7 +1368,7 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) info->PageSize = page_size; info->MmLowestPhysicalPage = 1; info->MmHighestPhysicalPage = 0x7fffffff / page_size; -#ifdef HAVE_SYS_SYSINFO_H +#ifdef HAVE_SYSINFO if (!sysinfo(&sinfo)) { ULONG64 total = (ULONG64)sinfo.totalram * sinfo.mem_unit; diff --git a/include/config.h.in b/include/config.h.in index 64f56fdb2c1..6acafca971e 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1008,6 +1008,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSCALL_H +/* Define to 1 if you have the `sysinfo' function. */ +#undef HAVE_SYSINFO + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ASOUNDLIB_H