mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 06:21:47 +00:00
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: Gerald Pfeifer <gerald@pfeifer.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a52b58473c
commit
59da79021a
1
configure
vendored
1
configure
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue