summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 0000000000..1bd0d602a5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,34 @@
1From 97fed07132533a1b2bce9c60e305a5d09aee2e9b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 27 May 2018 08:36:44 -0700
4Subject: [PATCH 18/19] Define glibc compatible basename() for non-glibc
5 systems
6
7Fixes builds with musl, even though systemd is adamant about
8using non-posix basename implementation, we have a way out
9
10Upstream-Status: Inappropriate [musl specific]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/machine/machine-dbus.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
18index 7f41465cc..cee8a5d43 100644
19--- a/src/machine/machine-dbus.c
20+++ b/src/machine/machine-dbus.c
21@@ -11,6 +11,10 @@
22 #include <libgen.h>
23 #undef basename
24
25+#if !defined(__GLIBC__)
26+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
27+#endif
28+
29 #include "alloc-util.h"
30 #include "bus-common-errors.h"
31 #include "bus-internal.h"
32--
332.11.0
34