mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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
This commit is contained in:
10
meson.build
10
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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user