From 6a33ab8b96f052670051ffe87ffa1257bbaf58d4 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 29 Dec 2025 22:56:18 +0000 Subject: [PATCH] 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); | ^ --- pkgs/by-name/pa/pax-utils/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/pa/pax-utils/package.nix b/pkgs/by-name/pa/pax-utils/package.nix index 735039521fcc..b7bb2dc83645 100644 --- a/pkgs/by-name/pa/pax-utils/package.nix +++ b/pkgs/by-name/pa/pax-utils/package.nix @@ -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 ];