pax-utils: enable seccomp and fuzzong only on linux
On `darwin` the build fails on missing `memfd_create()` symbols as https://hydra.nixos.org/build/314413362: ../fuzz-ar.c:18:7: error: call to undeclared function 'memfd_create'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 18 | fd = memfd_create("fuzz-input.a", MFD_CLOEXEC); | ^
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
buildPackages,
|
||||
docbook_xml_dtd_44,
|
||||
docbook_xsl,
|
||||
withFuzzing ? stdenv.hostPlatform.isLinux,
|
||||
withLibcap ? stdenv.hostPlatform.isLinux,
|
||||
withSeccomp ? stdenv.hostPlatform.isLinux,
|
||||
libcap,
|
||||
pkg-config,
|
||||
meson,
|
||||
@@ -29,7 +31,9 @@ stdenv.mkDerivation rec {
|
||||
strictDeps = true;
|
||||
|
||||
mesonFlags = [
|
||||
(lib.mesonBool "use_fuzzing" withFuzzing)
|
||||
(lib.mesonEnable "use_libcap" withLibcap)
|
||||
(lib.mesonBool "use_seccomp" withSeccomp)
|
||||
];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
Reference in New Issue
Block a user