[Buildroot] [PATCH 3/3] package/lua-lunix: fix incompatible pointer types

Francois Perrad francois.perrad.86 at gmail.com
Fri Sep 11 08:06:10 UTC 2026


see https://autobuild.buildroot.org/results/7fba1da21af93a7a0431fb9431dc3c8e872a00ac

Signed-off-by: Francois Perrad <francois.perrad.86 at gmail.com>
---
 ...0002-fix-Wincompatible-pointer-types.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/lua-lunix/0002-fix-Wincompatible-pointer-types.patch

diff --git a/package/lua-lunix/0002-fix-Wincompatible-pointer-types.patch b/package/lua-lunix/0002-fix-Wincompatible-pointer-types.patch
new file mode 100644
index 000000000..910d684b8
--- /dev/null
+++ b/package/lua-lunix/0002-fix-Wincompatible-pointer-types.patch
@@ -0,0 +1,37 @@
+From: Francois Perrad <francois.perrad at gadz.org>
+Date: Wed, 9 Sep 2026 20:36:07 +0200
+Subject: [PATCH] fix -Wincompatible-pointer-types
+
+src/unix.c: In function 'unix_sigaction':
+src/unix.c:9721:32: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
+ 9791 |                 act.sa_handler = unixL_tosighandler(L, -1);
+      |                                ^
+In file included from src/unix.c:48:
+/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
+   72 | typedef void (*__sighandler_t) (int);
+      |                ^~~~~~~~~~~~~~
+
+note: this warning is enabled by removing -std=gnu99 from CFLAGS
+
+Upstream: https://github.com/wahern/lunix/pull/25
+Signed-off-by: Francois Perrad <francois.perrad.86 at gmail.com>
+---
+ src/unix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lunix-rel-20220331/src/unix.c b/lunix-rel-20220331/src/unix.c
+index 2e0d77a..6d91e51 100644
+--- a/lunix-rel-20220331/src/unix.c
++++ b/lunix-rel-20220331/src/unix.c
+@@ -1278,7 +1278,7 @@ MAYBEUSED static void ts_timersub(struct timespec *r, struct timespec a, struct
+  * manipulated in C as type pointer-to-function. Accordingly, our code
+  * expects lua_touserdata to return pointer-to-pointer-to-function.
+  */
+-typedef void u_sighandler_t();
++typedef void u_sighandler_t(int);
+ 
+ MAYBEUSED static void sa_discard(int signo NOTUSED) {
+ 	return;
+-- 
+2.43.0
+
-- 
2.43.0



More information about the buildroot mailing list