fix compilation under FreeBSD
sys headers must come before libprocstat meson is missing a libprocstat dependency. iconv is also broken with meson and freebsd. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
6a3025dd72
commit
4a26eba0d9
@ -49,6 +49,7 @@ cdata.set('EXV_ENABLE_VIDEO', get_option('video'))
|
||||
|
||||
deps = []
|
||||
deps += cpp.find_library('ws2_32', required: host_machine.system() == 'windows')
|
||||
deps += cpp.find_library('procstat', required: host_machine.system() == 'freebsd')
|
||||
|
||||
if cpp.get_argument_syntax() == 'gcc' and cpp.version().version_compare('<9')
|
||||
if host_machine.system() == 'linux' and cpp.get_define('_LIBCPP_VERSION', prefix: '#include <new>') == ''
|
||||
@ -83,7 +84,7 @@ if zlib_dep.found()
|
||||
deps += zlib_dep
|
||||
endif
|
||||
|
||||
if meson.version().version_compare('>= 0.60')
|
||||
if meson.version().version_compare('>= 0.60') and host_machine.system() != 'freebsd'
|
||||
iconv_dep = dependency('iconv', disabler: true, required: get_option('iconv'))
|
||||
else
|
||||
iconv_dep = dependency('', disabler: true, required: false)
|
||||
|
||||
@ -39,7 +39,7 @@ namespace fs = std::experimental::filesystem;
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <libprocstat.h>
|
||||
// clang-format off
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
@ -47,6 +47,8 @@ namespace fs = std::experimental::filesystem;
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <libprocstat.h>
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
#ifndef _MAX_PATH
|
||||
|
||||
@ -46,12 +46,14 @@
|
||||
#elif defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <libprocstat.h>
|
||||
// clang-format off
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <unistd.h>
|
||||
#include <libprocstat.h>
|
||||
// clang-format on
|
||||
#elif defined(__sun__)
|
||||
#include <dlfcn.h>
|
||||
#include <link.h>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user