* [Buildroot] [PATCH 1/1] package/mdevd: fix build with glibc >= 2.43
@ 2026-04-04 6:56 Bernd Kuhls
2026-04-04 21:06 ` Julien Olivain via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-04-04 6:56 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Eric Le Bihan, J . Neuschäfer
Buildroot commit 227378b5930b681c79a13476ae60a98753a98a03 bumped glibc
to 2.43 causing a build error in mdevd:
src/mdevd/mdevd.c: In function 'act_on_event':
src/mdevd/mdevd.c:797:36: error: assignment of read-only location
'*(const char *)strchr(ud->devname, 10)'
797 | *strchr(ud->devname, '\n') = 0 ;
Add upstream commit to fix the problem.
Fixes:
https://autobuild.buildroot.net/results/92b/92b9b307996a44b66dc3f7f7d35dd74816b62480/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
...-Some-libcs-have-a-char-const-strchr.patch | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 package/mdevd/0001-Some-libcs-have-a-char-const-strchr.patch
diff --git a/package/mdevd/0001-Some-libcs-have-a-char-const-strchr.patch b/package/mdevd/0001-Some-libcs-have-a-char-const-strchr.patch
new file mode 100644
index 0000000000..f039d34a05
--- /dev/null
+++ b/package/mdevd/0001-Some-libcs-have-a-char-const-strchr.patch
@@ -0,0 +1,29 @@
+From 4594ed03e4ced04cb914c8fccad1ffab41cc4ee5 Mon Sep 17 00:00:00 2001
+From: Laurent Bercot <ska-skaware@skarnet.org>
+Date: Wed, 18 Mar 2026 15:45:17 +0000
+Subject: Some libcs have a char const *strchr()? need to investigate
+
+Upstream: https://git.skarnet.org/cgi-bin/cgit.cgi/mdevd/commit/?id=4594ed03e4ced04cb914c8fccad1ffab41cc4ee5
+
+[Bernd: removed non-related content of the upstream commit]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/mdevd/mdevd.c | 2 +-
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c
+index aecd5a7..7df3aaf 100644
+--- a/src/mdevd/mdevd.c
++++ b/src/mdevd/mdevd.c
+@@ -794,7 +794,7 @@ static inline int act_on_event (struct uevent_s const *event, unsigned int actio
+ if (ud->devname)
+ {
+ ud->devname += 9 ;
+- *strchr(ud->devname, '\n') = 0 ;
++ *(char *)strchr(ud->devname, '\n') = 0 ;
+ }
+ }
+ if (!ud->devname) ud->devname = basename(ud->sysdevpath) ;
+--
+cgit v1.2.3-70-g09d2
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/mdevd: fix build with glibc >= 2.43
2026-04-04 6:56 [Buildroot] [PATCH 1/1] package/mdevd: fix build with glibc >= 2.43 Bernd Kuhls
@ 2026-04-04 21:06 ` Julien Olivain via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-04-04 21:06 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, Dick Olsson, Eric Le Bihan, J . Neuschäfer
On 04/04/2026 08:56, Bernd Kuhls wrote:
> Buildroot commit 227378b5930b681c79a13476ae60a98753a98a03 bumped glibc
> to 2.43 causing a build error in mdevd:
>
> src/mdevd/mdevd.c: In function 'act_on_event':
> src/mdevd/mdevd.c:797:36: error: assignment of read-only location
> '*(const char *)strchr(ud->devname, 10)'
> 797 | *strchr(ud->devname, '\n') = 0 ;
>
> Add upstream commit to fix the problem.
>
> Fixes:
> https://autobuild.buildroot.net/results/92b/92b9b307996a44b66dc3f7f7d35dd74816b62480/
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-04 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-04 6:56 [Buildroot] [PATCH 1/1] package/mdevd: fix build with glibc >= 2.43 Bernd Kuhls
2026-04-04 21:06 ` Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox