Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 1 | From 8c8b13768d22f39edfce38e123b740c43d7e31c4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 18 Feb 2023 17:29:10 -0800 |
| 4 | Subject: [PATCH] libnm-std-aux: Adjust signature of _nm_assert_fail_internal |
| 5 | |
| 6 | the LSB states __assert_fail is: |
| 7 | const char*, const char*, unsigned int, const char* |
| 8 | https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib---assert-fail-1.html |
| 9 | |
| 10 | musl uses a signed int instead. however, this is ok: |
| 11 | https://www.openwall.com/lists/musl/2019/03/04/6 |
| 12 | |
| 13 | nevertheless, since the application redefines __assert_fail, we have to make |
| 14 | the types match. (not upstreamable as the opposite breaks glibc) |
| 15 | |
| 16 | Upstream-Status: Inappropriate [musl specific] |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | --- |
| 19 | src/libnm-std-aux/nm-std-aux.h | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h |
| 23 | index e556aa4..0756a7c 100644 |
| 24 | --- a/src/libnm-std-aux/nm-std-aux.h |
| 25 | +++ b/src/libnm-std-aux/nm-std-aux.h |
| 26 | @@ -230,7 +230,7 @@ typedef uint64_t _nm_bitwise nm_be64_t; |
| 27 | _nm_noreturn static inline void |
| 28 | _nm_assert_fail_internal(const char *assertion, |
| 29 | const char *file, |
| 30 | - unsigned int line, |
| 31 | + int line, |
| 32 | const char *function) |
| 33 | { |
| 34 | __assert_fail("<dropped>", file, line, "<unknown-fcn>"); |
| 35 | -- |
| 36 | 2.39.2 |
| 37 | |