gentoo-ebuilds/sys-auth/polkit/files/polkit-126-musl.patch
Sam James 21c9a61e14
sys-auth/polkit: backport some fixes to 126
* Backport build fix for elogind
* Backport musl build fix
* ... which needs another fix for realpath / PATH order

Signed-off-by: Sam James <sam@gentoo.org>
2025-03-25 05:34:25 +00:00

34 lines
1.1 KiB
Diff

https://github.com/polkit-org/polkit/commit/074ad836836167190cfe5649f9fc50da2e79a0ab
From 074ad836836167190cfe5649f9fc50da2e79a0ab Mon Sep 17 00:00:00 2001
From: Jan Rybar <jrybar@redhat.com>
Date: Wed, 19 Feb 2025 14:20:22 +0100
Subject: [PATCH] Fix musl compilation error on Alpine
Disruptions between glibc and musl-(not-)predefined feature-test macros led to
a decision to remove a check for POSIX standards older than 17 years. It makes no
sense to test the existence of a macro that we explicitly define in
meson.build either (shall we test for _GNU_SOURCE).
---
src/programs/pkexec.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
index b439475f..4274c92b 100644
--- a/src/programs/pkexec.c
+++ b/src/programs/pkexec.c
@@ -674,12 +674,8 @@ main (int argc, char *argv[])
argv[n] = path_abs;
}
}
-#if _POSIX_C_SOURCE >= 200809L
+
s = realpath(path, NULL);
-#else
- s = NULL;
-# error We have to deal with realpath(3) PATH_MAX madness
-#endif
if (s != NULL)
{
/* The called program resolved to the canonical location. We don't update