OpenBSD: -lkvm and use PID_MAX

This commit is contained in:
Alastair Poole 2019-12-15 21:51:10 +00:00
parent af5d2a6bed
commit 0573f46256
3 changed files with 9 additions and 5 deletions

View File

@ -25,6 +25,13 @@ config_h.set_quoted('EFL_BETA_API_SUPPORT' , '1')
elm = dependency('elementary', version : '>=1.22.0')
top_inc = include_directories('.')
host_os = host_machine.system()
deps_os = declare_dependency(link_args : [] )
if host_os == 'openbsd'
deps_os = declare_dependency(link_args : [ '-lkvm' ])
endif
cc = meson.get_compiler('c')
config_h.set_quoted('EFL_CFLAGS', run_command(find_program('pkg-config'), '--libs', '--cflags', 'elementary').stdout().strip())
@ -50,6 +57,7 @@ if build_machine.system() == 'darwin'
endif
endif
if get_option('libclang') == true
#check for the header

View File

@ -86,10 +86,6 @@ _system_pid_max_get(void)
fclose(f);
pid_max = atoi(buf);
}
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
int mib[2] = { CTL_KERN, KERN_MAXPROC };
size_t len = sizeof(pid_max);
sysctl(mib, 2, &pid_max, &len, NULL, 0);
#elif defined(PID_MAX)
pid_max = PID_MAX;
#endif

View File

@ -29,7 +29,7 @@ src = files([
lib_dir = include_directories('.')
edi_lib_lib = shared_library('edi', src,
dependencies : [elm],
dependencies : [elm, deps_os],
include_directories : top_inc,
version : meson.project_version(),
install : true