Commit 59da7902 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

ntdll: Only use sysinfo function when present.

On some systems <sys/sysinfo.h> may be present while the sysinfo function may not, or at least not as part of standard libraries, so check whether the function is actually available before using it. This fixes builds on FreeBSD with the devel/libsysinfo present. Signed-off-by: 's avatarGerald Pfeifer <gerald@pfeifer.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a52b5847
......@@ -18068,6 +18068,7 @@ for ac_func in \
setprogname \
sigprocmask \
symlink \
sysinfo \
tcdrain \
thr_kill2
......
......@@ -2205,6 +2205,7 @@ AC_CHECK_FUNCS(\
setprogname \
sigprocmask \
symlink \
sysinfo \
tcdrain \
thr_kill2
)
......
......@@ -2737,7 +2737,8 @@ ULONG_PTR get_system_affinity_mask(void)
*/
void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info, BOOL wow64 )
{
#if defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT)
#if defined(HAVE_SYSINFO) \
&& defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT)
struct sysinfo sinfo;
if (!sysinfo(&sinfo))
......
......@@ -744,6 +744,9 @@
/* Define to 1 if you have the <syscall.h> 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
<SystemConfiguration/SCDynamicStoreCopyDHCPInfo.h> header file. */
#undef HAVE_SYSTEMCONFIGURATION_SCDYNAMICSTORECOPYDHCPINFO_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment