chore(3p/nix): Clean up libseccomp_dep

(cherry picked from commit b380f75867d48e6af461513d26803b61250d9c80)
This commit is contained in:
John Ericson 2019-11-04 14:20:15 -05:00 committed by Vincent Ambo
parent adff9913c0
commit 939cec746e

View file

@ -520,15 +520,16 @@ endif
# OS Specific checks # OS Specific checks
#============================================================================ #============================================================================
# Look for libsecppomp, required for Linux sandboxing. # Look for libsecppomp, required for Linux sandboxing.
libseccomp_dep = ''
if sys_name.contains('linux') if sys_name.contains('linux')
libseccomp_dep = dependency('libseccomp', version : '>= 2.3.1', required: false) libseccomp_dep = dependency(
if not (libseccomp_dep.found()) 'libseccomp',
error('Nix requires libseccomp on a linux host system') version : '>= 2.3.1',
endif not_found_message : 'Nix requires libseccomp on a linux host system')
config_h.set( config_h.set(
'HAVE_SECCOMP', 1, 'HAVE_SECCOMP', 1,
description : 'Whether seccomp is available and should be used for sandboxing.') description : 'Whether seccomp is available and should be used for sandboxing.')
else
libseccomp_dep = dependency('', required: false)
endif endif
if (sys_name.contains('freebsd')) if (sys_name.contains('freebsd'))