Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attr: backport patch for musl 1.2.5 #342008

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkgs/development/libraries/attr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ gettext ];

patches = [ ./musl.patch ];

postPatch = ''
for script in install-sh include/install-sh; do
patchShebangs $script
Expand Down
27 changes: 27 additions & 0 deletions pkgs/development/libraries/attr/musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 8a80d895dfd779373363c3a4b62ecce5a549efb2 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
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 <errno.h>
#include <string.h>
#include <locale.h>
+#include <libgen.h>

#include <attr/attributes.h>

--
cgit v1.1