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