aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index e575231129..b21b191d25 100644
--- a/meson.build
+++ b/meson.build
@@ -1058,10 +1058,6 @@ if compiler.has_header('alloca.h')
libgit_c_args += '-DHAVE_ALLOCA_H'
endif
-if compiler.has_header('sys/sysinfo.h')
- libgit_c_args += '-DHAVE_SYSINFO'
-endif
-
# Windows has libgen.h and a basename implementation, but we still need our own
# implementation to threat things like drive prefixes specially.
if host_machine.system() == 'windows' or not compiler.has_header('libgen.h')
@@ -1267,6 +1263,10 @@ if host_machine.system() != 'windows'
endif
endif
+if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>')
+ libgit_c_args += '-DHAVE_SYSINFO'
+endif
+
if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>')
libgit_c_args += '-DUSE_ST_TIMESPEC'
elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>')