Skip to content
Snippets Groups Projects
Commit 5e310743 authored by omni's avatar omni Committed by Patrycja Rosa
Browse files

community/elogind: patch GNU basename macro for musl

https://github.com/elogind/elogind/pull/271

needed since 5b03d0f6
parent 2a13d713
No related branches found
No related tags found
1 merge request!61091community/elogind: elogind.initd need cgroups & default to unified
Pipeline #214935 passed
......@@ -49,6 +49,7 @@ source="https://github.com/elogind/elogind/archive/v$pkgver/elogind-v$pkgver.tar
sigfillset.patch
statx.patch
strerror_r.patch
re-add_GNU_basename_macro_for_musl.patch
elogind.initd
"
......@@ -117,5 +118,6 @@ aca575a32e3bb209a5ddd20055b667c92fb4c1e70954a589243db4b145764b35c0067d0a9569b67f
28884612bee898c775f51a27ad26a5478ade3a1608cb528d7797a01ad3606a71379e7486a39246032d736810ad7c8e2925ba25d5f72d39473a14e6e23fcffe3e sigfillset.patch
f7f22edfea8062c6bfaa2e7b706368ab87b026bc486a2f34627bb82cd362883279ccd9e8436208b0904b86e80b3fa977695ca79a19e1dd9e7218dbb1eb8610e0 statx.patch
6b60da7b045a7004da09b910a192c3e9a00ef7507cb108d9639e18cc81e8bb56e37d3c8db1efee37334c15cddaca480f0cf25d7532cf2381f9981e9d2033bc44 strerror_r.patch
3bbbe054759f5e911219a588168935d4b0ced6e92da85ac39a51f52893ac775c10b19819ead960380241be8a66ad55e71ebb7445ff835241e1162bbe0202d5fd re-add_GNU_basename_macro_for_musl.patch
fe8855ffbb8149a8c3892791c4d179c8edf863e9641892c700637b352e8d9d31e406b1d6c5fed5c19e35eb9dcf33bfdb93f0b5a659aaef299ec10b442a878146 elogind.initd
"
From 75d55e3df04432a7720e6d7a373e20d3b71f39ae Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 27 Jan 2024 00:42:04 -0800
Subject: [PATCH] musl_missing.h: re-add GNU basename macro for musl
musl only provides POSIX basename and not GNU basename.
musl also recently removed their compatibility declaration from string.h:
https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
reverts 8ca381db232527dd1dfdc772b9845db5ce617bcf
---
src/basic/musl_missing.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/basic/musl_missing.h b/src/basic/musl_missing.h
index 41c66c9a42..aee6c4f9e2 100644
--- a/src/basic/musl_missing.h
+++ b/src/basic/musl_missing.h
@@ -44,6 +44,10 @@ void elogind_set_program_name(const char* pcall);
# define HAVE_SECURE_GETENV 1
#endif // HAVE_[__]SECURE_GETENV
+/* Poor man's basename */
+#define basename(path) \
+ (strrchr(path, '/') ? strrchr(path, '/')+1 : path)
+
/* strndupa may already be defined in another compatibility header */
#if !defined(strndupa)
#define strndupa(x_src, x_n) \
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment