diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-12-13 12:40:53 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-21 10:38:29 +0000 |
| commit | 5800c6a60fde019c4c5f5ae0e36cdeb0dc556940 (patch) | |
| tree | dd9340fec96d528226a2d27bc681d7e32f309a9f | |
| parent | 26560efaeabb50ecc89950956464505210b3133e (diff) | |
| download | poky-5800c6a60fde019c4c5f5ae0e36cdeb0dc556940.tar.gz | |
systemd: Fix build with latest musl
musl has removed basename from string.h [1] which leads to build
failures now as declaration is gone and it should be coming from
libgen.h
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
(From OE-Core rev: 868542315f8c914f96ee55713f7a3e0d0154c3ae)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 7d74cfcc24..24dd6b0df1 100644 --- a/meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch | |||
| @@ -13,22 +13,16 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 13 | src/machine/machine-dbus.c | 5 +++++ | 13 | src/machine/machine-dbus.c | 5 +++++ |
| 14 | 1 file changed, 5 insertions(+) | 14 | 1 file changed, 5 insertions(+) |
| 15 | 15 | ||
| 16 | diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c | 16 | --- a/src/basic/string-util.h |
| 17 | index 45bc056326..aee51d5da5 100644 | 17 | +++ b/src/basic/string-util.h |
| 18 | --- a/src/machine/machine-dbus.c | 18 | @@ -26,6 +26,10 @@ |
| 19 | +++ b/src/machine/machine-dbus.c | 19 | #define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ |
| 20 | @@ -4,6 +4,11 @@ | 20 | #define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ |
| 21 | #include <sys/mount.h> | ||
| 22 | #include <sys/wait.h> | ||
| 23 | 21 | ||
| 24 | +#if !defined(__GLIBC__) | 22 | +#if !defined(__GLIBC__) |
| 25 | +#include <string.h> | ||
| 26 | +#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) | 23 | +#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) |
| 27 | +#endif | 24 | +#endif |
| 28 | + | 25 | + |
| 29 | #include "alloc-util.h" | 26 | static inline char* strstr_ptr(const char *haystack, const char *needle) { |
| 30 | #include "bus-common-errors.h" | 27 | if (!haystack || !needle) |
| 31 | #include "bus-get-properties.h" | 28 | return NULL; |
| 32 | -- | ||
| 33 | 2.39.2 | ||
| 34 | |||
