build: avoid sysinfo() on Solaris

Solaris inherited the SVR4 sysinfo() function, which takes a different
number of arguments from Linux, and provides information such as host
name and OS version, but not information on free or total memory.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith
2025-10-14 17:07:28 -07:00
committed by Philip Withnall
parent 61384f791d
commit 94d5369d9a

View File

@@ -760,7 +760,6 @@ functions = [
'strtoll_l',
'strtoull_l',
'symlink',
'sysinfo',
'timegm',
'unsetenv',
'uselocale',
@@ -824,6 +823,11 @@ if host_system != 'aix'
functions += ['splice']
endif
# SVR4 sysinfo() does not behave the same as sysinfo() on other Unixes
if host_system != 'sunos'
functions += ['sysinfo']
endif
foreach f : functions
if cc.has_function(f)
define = 'HAVE_' + f.underscorify().to_upper()