Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH] wiphy: include libgen.h to fix implicit def. with musl libc
@ 2024-02-12 18:47 Clayton Craft
  2024-02-13 23:09 ` Denis Kenzior
  0 siblings, 1 reply; 13+ messages in thread
From: Clayton Craft @ 2024-02-12 18:47 UTC (permalink / raw)
  To: iwd

This fixes a runtime segfault with musl libc and GCC13. musl dropped a
basename prototype[1] in string.h, causing GCC to define it implicitly
with the wrong function signature. The correct basename definition based
on how wiphy uses it is in libgen.h.

For context, see:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/15622

1. https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
---
 src/wiphy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/wiphy.c b/src/wiphy.c
index 3258b761..9d9c6c22 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -33,6 +33,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <limits.h>
+#include <libgen.h>
 
 #include <ell/ell.h>
 
-- 
2.43.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-15 22:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 18:47 [PATCH] wiphy: include libgen.h to fix implicit def. with musl libc Clayton Craft
2024-02-13 23:09 ` Denis Kenzior
2024-02-14  0:13   ` Clayton Craft
2024-02-14  7:03   ` Marcel Holtmann
2024-02-14 16:26     ` Denis Kenzior
2024-02-14 16:30       ` Marcel Holtmann
2024-02-14 16:35         ` Denis Kenzior
2024-02-14 16:39           ` Marcel Holtmann
2024-02-14 16:46             ` Denis Kenzior
2024-02-14 16:52               ` Marcel Holtmann
2024-03-14 22:30                 ` Clayton Craft
2024-03-15 13:49                   ` Denis Kenzior
2024-03-15 22:09                     ` Clayton Craft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox