From 0e02f3d26306c4d0a339df8a534ea26d178ea86b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 15 Sep 2024 10:21:40 +0200 Subject: [PATCH] attr: backport patch for musl 1.2.5 --- pkgs/development/libraries/attr/default.nix | 2 ++ pkgs/development/libraries/attr/musl.patch | 27 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/libraries/attr/musl.patch diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index eb8f0d1c3b97..dfc8a5cdb82b 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext ]; + patches = [ ./musl.patch ]; + postPatch = '' for script in install-sh include/install-sh; do patchShebangs $script diff --git a/pkgs/development/libraries/attr/musl.patch b/pkgs/development/libraries/attr/musl.patch new file mode 100644 index 000000000000..818161f15243 --- /dev/null +++ b/pkgs/development/libraries/attr/musl.patch @@ -0,0 +1,27 @@ +From 8a80d895dfd779373363c3a4b62ecce5a549efb2 Mon Sep 17 00:00:00 2001 +From: "Haelwenn (lanodan) Monnier" +Date: Sat, 30 Mar 2024 10:17:10 +0100 +Subject: tools/attr.c: Add missing libgen.h include for basename(3) + +Fixes compilation issue with musl and modern C99 compilers. + +See: https://bugs.gentoo.org/926294 +--- + tools/attr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/attr.c b/tools/attr.c +index f12e4af..6a3c1e9 100644 +--- a/tools/attr.c ++++ b/tools/attr.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + +-- +cgit v1.1 +