sys-apps/systemd: add v256.5 with musl libc patches

- https://code.atwilcox.tech/sphen/scaly/systemd
- https://catfox.life/2024/09/05/porting-systemd-to-musl-libc-powered-linux/
This commit is contained in:
2024-09-25 22:42:59 +03:00
parent b22938ee78
commit 538fd3f7b3
41 changed files with 6318 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
From 6ef506dbf1d28618d92f0b9bb2b2fa2b989acd99 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 18 Aug 2024 02:50:50 -0500
Subject: [PATCH 15/34] basic: Define our own basename
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
This prevents issues where the POSIX basename is not the same as the GNU
basename. I think maybe upstream could be convinced since glibc does
provide the POSIX one as well, but until then, let's do this.
This cannot be upstreamed.
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/basic/string-util.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index ff5efbcf557b..656f5100e202 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -26,6 +26,8 @@
#define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */
#define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */
+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
+
static inline char* strstr_ptr(const char *haystack, const char *needle) {
if (!haystack || !needle)
return NULL;
--
2.41.0