diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-14 11:19:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-14 11:19:28 -0700 |
| commit | e78bca2eb79cb209151be4b8530fdea0bf0d5865 (patch) | |
| tree | 2c1208bd8bcf188db586bd28be2bae1163361942 /meson.build | |
| parent | 8c5f7db806a9721112fd19596439469480ca94df (diff) | |
| parent | 0c83bbc70412d96953b3b648fcea1a8fa15a5ca1 (diff) | |
| download | git-e78bca2eb79cb209151be4b8530fdea0bf0d5865.tar.xz | |
Merge branch 'rj/freebsd-sysinfo-build-fix'
Build fix for FreeBSD.
* rj/freebsd-sysinfo-build-fix:
build: fix FreeBSD build when sysinfo compat library installed
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build index eaa45b21ea..d50c340e89 100644 --- a/meson.build +++ b/meson.build @@ -1331,10 +1331,6 @@ 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>') @@ -1438,6 +1434,12 @@ if compiler.has_header('sys/sysctl.h') endif endif +if not has_bsd_sysctl + if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>') + libgit_c_args += '-DHAVE_SYSINFO' + endif +endif + if not meson.is_cross_build() and compiler.run(''' #include <stdio.h> |
