From 2b9c5958a10affa63551166c281bcd36ea021674 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 3 Nov 2021 16:55:36 +0000 Subject: [PATCH] netbsd.compat: don't use musl's sys/cdefs.h When building glib statically, a Meson check would fail, because the check would interpret any warning as failure, and it would see the warning that the musl sys/cdefs.h emits about the file being deprecated. --- pkgs/os-specific/bsd/netbsd/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 7a6604afe641..25ac9ce451cc 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -192,6 +192,12 @@ in lib.makeScopeWithSplicing configurePlatforms = [ "build" "host" ]; configureFlags = [ "--cache-file=config.cache" + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ + # We include this header in our musl package only for legacy + # compatibility, and compat works fine without it (and having it + # know about sys/cdefs.h breaks packages like glib when built + # statically). + "ac_cv_header_sys_cdefs_h=no" ]; nativeBuildInputs = with buildPackages.netbsd; commonDeps ++ [