aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-05-28 08:58:32 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 11:43:10 +0100
commit5ff707e15c68d77c371b43a970e62302f7492545 (patch)
treeb4ae9aa47fb70c7260740e89739f03c1801ecf19 /meta/recipes-core/systemd/systemd
parent24e9ae887739f2ac6c3694b04c2c6159d6549be9 (diff)
downloadopenembedded-core-contrib-5ff707e15c68d77c371b43a970e62302f7492545.tar.gz
systemd: Define basename() for musl
(From OE-Core rev: 167098cdd875a02221ff6d15f443c02c1bcdc33f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-core/systemd/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
new file mode 100644
index 0000000000..736d525ad3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -0,0 +1,33 @@
+From 5f1f064c81ea30acf93cfa0fb466b38f094f488c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 May 2018 08:36:44 -0700
+Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
+
+Fixes builds with musl, even though systemd is adamant about
+using non-posix basename implementation, we have a way out
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/machine/machine-dbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
+index 2d7806491b..9a3bdb1d76 100644
+--- a/src/machine/machine-dbus.c
++++ b/src/machine/machine-dbus.c
+@@ -29,6 +29,10 @@
+ #include <libgen.h>
+ #undef basename
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ #include "alloc-util.h"
+ #include "bus-common-errors.h"
+ #include "bus-internal.h"
+--
+2.17.0
+