pkgsMusl.util-linuxMinimal: fix build (#507581)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
From 126c850f74cbafd3af55a6f829308d7f63de4c7b Mon Sep 17 00:00:00 2001
|
||||
From: Aleksi Hannula <ahannula4+nixgit@gmail.com>
|
||||
Date: Tue, 7 Apr 2026 14:52:16 +0300
|
||||
Subject: [PATCH] nsenter: Fix AT_HANDLE_FID on musl
|
||||
|
||||
---
|
||||
sys-utils/nsenter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
|
||||
index e10ba9c..340e6b1 100644
|
||||
--- a/sys-utils/nsenter.c
|
||||
+++ b/sys-utils/nsenter.c
|
||||
@@ -220,7 +220,7 @@ static int fill_nsfs_file_handle(struct file_handle *fh, uint64_t ns_id)
|
||||
|
||||
fh->handle_bytes = sizeof(struct nsfs_file_handle);
|
||||
if (name_to_handle_at(nsfs_fd, "", fh, &mount_id,
|
||||
- AT_EMPTY_PATH | AT_HANDLE_FID) == -1)
|
||||
+ AT_EMPTY_PATH | 0x200 /* AT_HANDLE_FID */) == -1)
|
||||
return -errno;
|
||||
assert(fh->handle_type);
|
||||
nsfs_fh_tmpl = *fh;
|
||||
--
|
||||
2.51.2
|
||||
|
||||
@@ -59,6 +59,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Fix compile of 2.42+ on Darwin.
|
||||
# https://lore.kernel.org/util-linux/CAEUYr6ZjVX1bd-xcBGtFN_ZYwQnXDYsw7d1-7sTpF2BbgfrR+g@mail.gmail.com/T/#u
|
||||
./include-correct-struct-statfs-header.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
# Musl does not define AT_HANDLE_FID, hard-code it.
|
||||
# https://github.com/util-linux/util-linux/pull/4203
|
||||
./fix-musl-nsenter.patch
|
||||
];
|
||||
|
||||
# We separate some of the utilities into their own outputs. This
|
||||
|
||||
Reference in New Issue
Block a user