mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 02:50:46 +00:00
networkmanager: Fix build with musl
__assert_fail signature is assuming glibc which is fine for glibc systems but we have to consider musl case too. Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
From 8c8b13768d22f39edfce38e123b740c43d7e31c4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 18 Feb 2023 17:29:10 -0800
|
||||
Subject: [PATCH] libnm-std-aux: Adjust signature of _nm_assert_fail_internal
|
||||
|
||||
the LSB states __assert_fail is:
|
||||
const char*, const char*, unsigned int, const char*
|
||||
https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib---assert-fail-1.html
|
||||
|
||||
musl uses a signed int instead. however, this is ok:
|
||||
https://www.openwall.com/lists/musl/2019/03/04/6
|
||||
|
||||
nevertheless, since the application redefines __assert_fail, we have to make
|
||||
the types match. (not upstreamable as the opposite breaks glibc)
|
||||
|
||||
Upstream-Status: Inappropriate [musl specific]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libnm-std-aux/nm-std-aux.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h
|
||||
index e556aa4..0756a7c 100644
|
||||
--- a/src/libnm-std-aux/nm-std-aux.h
|
||||
+++ b/src/libnm-std-aux/nm-std-aux.h
|
||||
@@ -230,7 +230,7 @@ typedef uint64_t _nm_bitwise nm_be64_t;
|
||||
_nm_noreturn static inline void
|
||||
_nm_assert_fail_internal(const char *assertion,
|
||||
const char *file,
|
||||
- unsigned int line,
|
||||
+ int line,
|
||||
const char *function)
|
||||
{
|
||||
__assert_fail("<dropped>", file, line, "<unknown-fcn>");
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -30,6 +30,8 @@ SRC_URI = " \
|
||||
file://enable-dhcpcd.conf \
|
||||
file://enable-iwd.conf \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " file://0001-libnm-std-aux-Adjust-signature-of-_nm_assert_fail_in.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "2f6756d507bb6b46716594b67e6fe7491891e1b5b167bbafc5157dfa7753d5b4"
|
||||
|
||||
S = "${WORKDIR}/NetworkManager-${PV}"
|
||||
|
||||
Reference in New Issue
Block a user