diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-03-19 06:01:19 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-03-20 09:51:43 -0700 |
| commit | ede40e0d90a9eafbdfceb7f25555c46f5027b9cd (patch) | |
| tree | cb086d28a00a9f82f86a3fb08330db620ee194eb | |
| parent | d52f508569aff7d85a3a9005c1a2fc02b0a5f406 (diff) | |
| download | meta-openembedded-ede40e0d90a9eafbdfceb7f25555c46f5027b9cd.tar.gz | |
minicoredumper: backport patch to build with glibc 2.43
As the subject says.
Fixes compilation error:
| ../../../sources/minicoredumper-2.0.7/src/coreinject/main.c: In function 'inject_data':
| ../../../sources/minicoredumper-2.0.7/src/coreinject/main.c:248:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
| 248 | p = strrchr(b_fname, '/');
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-kernel/minicoredumper/files/0001-coreinject-fix-assignment-of-const-qualified-type.patch | 44 | ||||
| -rw-r--r-- | meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/minicoredumper/files/0001-coreinject-fix-assignment-of-const-qualified-type.patch b/meta-oe/recipes-kernel/minicoredumper/files/0001-coreinject-fix-assignment-of-const-qualified-type.patch new file mode 100644 index 0000000000..ace46202b7 --- /dev/null +++ b/meta-oe/recipes-kernel/minicoredumper/files/0001-coreinject-fix-assignment-of-const-qualified-type.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 07023a2d2ef059a039fef83ee4b33a7e47ca8e3e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: John Ogness <john.ogness@linutronix.de> | ||
| 3 | Date: Tue, 24 Feb 2026 11:33:40 +0106 | ||
| 4 | Subject: [PATCH] coreinject: fix assignment of const-qualified type | ||
| 5 | |||
| 6 | coreinject fails to build with glibc 2.43. | ||
| 7 | |||
| 8 | The issue is due to a new glibc feature: | ||
| 9 | |||
| 10 | * For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, | ||
| 11 | strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return | ||
| 12 | pointers into their input arrays now have definitions as macros that | ||
| 13 | return a pointer to a const-qualified type when the input argument is | ||
| 14 | a pointer to a const-qualified type. | ||
| 15 | |||
| 16 | The fix is trivial since the returned strrchr() value is only used in | ||
| 17 | a way compatible with const pointers. The data type was simply defined | ||
| 18 | incorrectly. | ||
| 19 | |||
| 20 | Reported-by: Aurelien Jarno <aurel32@debian.org> | ||
| 21 | Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128695 | ||
| 22 | Signed-off-by: John Ogness <john.ogness@linutronix.de> | ||
| 23 | |||
| 24 | Upstream-Status: Backport [https://github.com/diamon/minicoredumper/commit/eb66f10ae26edf94bf41d513ce90a4eb1e0f11b3] | ||
| 25 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 26 | --- | ||
| 27 | src/coreinject/main.c | 2 +- | ||
| 28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 29 | |||
| 30 | diff --git a/src/coreinject/main.c b/src/coreinject/main.c | ||
| 31 | index faf8edf..198485d 100644 | ||
| 32 | --- a/src/coreinject/main.c | ||
| 33 | +++ b/src/coreinject/main.c | ||
| 34 | @@ -240,9 +240,9 @@ static int inject_data(FILE *f_core, FILE *f_symmap, const char *b_fname, | ||
| 35 | struct ident_data indirect; | ||
| 36 | struct ident_data direct; | ||
| 37 | const char *ident; | ||
| 38 | + const char *p; | ||
| 39 | FILE *f_dump; | ||
| 40 | int err = 0; | ||
| 41 | - char *p; | ||
| 42 | |||
| 43 | /* extract ident name from file path */ | ||
| 44 | p = strrchr(b_fname, '/'); | ||
diff --git a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb index 44d85550ee..ff4fdf358e 100644 --- a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb +++ b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.7.bb | |||
| @@ -18,6 +18,7 @@ SRC_URI = "git://github.com/diamon/minicoredumper;protocol=https;branch=master \ | |||
| 18 | file://run-ptest \ | 18 | file://run-ptest \ |
| 19 | file://0001-corestripper-Fix-uninitialized-warning.patch \ | 19 | file://0001-corestripper-Fix-uninitialized-warning.patch \ |
| 20 | file://0002-Fix-2038-year-problem-in-timestamp-handling.patch \ | 20 | file://0002-Fix-2038-year-problem-in-timestamp-handling.patch \ |
| 21 | file://0001-coreinject-fix-assignment-of-const-qualified-type.patch \ | ||
| 21 | " | 22 | " |
| 22 | 23 | ||
| 23 | 24 | ||
