summaryrefslogtreecommitdiffstats
path: root/meta
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-05-29 21:07:17 +0100
commit43f7ea8d0d90180370234899f81995f51bf05e88 (patch)
treedfdb98e572bb70919941b827d410250fb9182584 /meta
parentbed11ee92a7ac871909a04f751732dbf02ab7c85 (diff)
downloadpoky-43f7ea8d0d90180370234899f81995f51bf05e88.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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch33
-rw-r--r--meta/recipes-core/systemd/systemd_237.bb1
2 files changed, 34 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 @@
1From 5f1f064c81ea30acf93cfa0fb466b38f094f488c 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] Define glibc compatible basename() for non-glibc systems
5
6Fixes builds with musl, even though systemd is adamant about
7using non-posix basename implementation, we have a way out
8
9Upstream-Status: Inappropriate [musl specific]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/machine/machine-dbus.c | 4 ++++
14 1 file changed, 4 insertions(+)
15
16diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
17index 2d7806491b..9a3bdb1d76 100644
18--- a/src/machine/machine-dbus.c
19+++ b/src/machine/machine-dbus.c
20@@ -29,6 +29,10 @@
21 #include <libgen.h>
22 #undef basename
23
24+#if !defined(__GLIBC__)
25+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
26+#endif
27+
28 #include "alloc-util.h"
29 #include "bus-common-errors.h"
30 #include "bus-internal.h"
31--
322.17.0
33
diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb
index c4743a6b9d..2e6558ded1 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -53,6 +53,7 @@ SRC_URI += "file://touchscreen.rules \
53 file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \ 53 file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \
54 file://libmount.patch \ 54 file://libmount.patch \
55 file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \ 55 file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
56 file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
56 " 57 "
57SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch" 58SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
58 59