dietsplash: Update and fix build with musl
PATCH 1/2 dietsplash: Update and fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- ...me-API-for-non-glibc-library-e.g.-mu.patch | 28 +++++++++++++++++++ .../dietsplash/dietsplash_git.bb | 7 +++-- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-graphics/dietsplash/dietsplash/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch
meta-oe/recipes-graphics/dietsplash/dietsplash/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 272491297564513c4ce49a11bc1ecc523a3afd63 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 15 Mar 2024 11:05:54 -0700 +Subject: [PATCH] Mimic GNU basename() API for non-glibc library e.g. musl + +Upstream-Status: Submitted [https://github.com/lucasdemarchi/dietsplash/pull/7] +Signed-off-by: Khem Raj <[email protected]> +--- + src/util.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/util.h b/src/util.h +index 1f4c3ef..a3ab54a 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -60,6 +60,9 @@ + */ + #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr)) + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif + + #define DIE_PREFIX "[" PACKAGE_NAME "] ERR: " + #define LOG_SUFFIX "\n" +-- +2.44.0 +
meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb +4 -3
@@ -4,12 +4,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" # Really, no depends besides a C library -PV = "0.3" +PV = "0.3+git" -SRCREV = "ef2e1a390e768e21e6a6268977580ee129a96633" +SRCREV = "8bed71d860bbb0c8792fa2a1179c9beeae84d577" SRC_URI = "git://github.com/lucasdemarchi/dietsplash.git;branch=master;protocol=https \ file://0001-configure.ac-Do-not-demand-linker-hash-style.patch \ - " + file://0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch \ +" inherit autotools
Signature · 1 line
2.44.0
PATCH 2/2 frr: Upgrade to latest on 9.1 stable
Fix build with latest musl
Signed-off-by Khem Raj <[email protected]>
--- ...me-API-for-non-glibc-library-e.g.-mu.patch | 35 +++++++++++++++++++ .../recipes-protocols/frr/frr_9.1.bb | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch
meta-networking/recipes-protocols/frr/frr/0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 73c21bafc7065f0ab1d40fee2c6ce0c140d1b859 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 15 Mar 2024 11:31:02 -0700 +Subject: [PATCH] Mimic GNU basename() API for non-glibc library e.g. musl + +musl only provides POSIX version of basename and it has also removed +providing it via string.h header [1] which now results in compile errors +with newer compilers e.g. clang-18 + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/15561] +Signed-off-by: Khem Raj <[email protected]> +--- + lib/zebra.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/zebra.h b/lib/zebra.h +index 15a54f6cdf..cc40b48339 100644 +--- a/lib/zebra.h ++++ b/lib/zebra.h +@@ -226,6 +226,10 @@ struct in_pktinfo { + + #define strmatch(a,b) (!strcmp((a), (b))) + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif ++ + #if BYTE_ORDER == LITTLE_ENDIAN + #define htonll(x) (((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32)) + #define ntohll(x) (((uint64_t)ntohl((x)&0xFFFFFFFF) << 32) | ntohl((x) >> 32)) +-- +2.44.0 +
meta-networking/recipes-protocols/frr/frr_9.1.bb +2 -1
@@ -12,9 +12,10 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.1 \ file://frr.pam \ + file://0001-Mimic-GNU-basename-API-for-non-glibc-library-e.g.-mu.patch \ " -SRCREV = "312faf8008bb4f3b9e84b8e2758cd2cbdf5742b5" +SRCREV = "ca2d6f0f1e000951224a18973cc1827f7f5215b5" UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$"
Signature · 1 line
2.44.0