From 2d7e810f731bb11fc4c866c52dda1a6e171aa513 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Fri, 11 Sep 2026 10:06:10 +0200 Subject: [PATCH] package/lua-lunix: fix build with gcc >= 15 Fixes: https://autobuild.buildroot.org/results/7fba1da21af93a7a0431fb9431dc3c8e872a00ac Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- ...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 0000000000..910d684b88 --- /dev/null +++ b/package/lua-lunix/0002-fix-Wincompatible-pointer-types.patch @@ -0,0 +1,37 @@ +From: Francois Perrad +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 +--- + 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 +