From 94d5369d9a206748ac39e76d0ca37190ff94c01c Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 14 Oct 2025 17:07:28 -0700 Subject: [PATCH] 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 --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 29b9ccb49..1a700e348 100644 --- a/meson.build +++ b/meson.build @@ -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()