diff mbox series

[meta-webserver] ][PATCH 2/2] hiawatha: use -std=gnu17 for compilation

Message ID 20250508223514.999569-2-yoann.congal@smile.fr
State Under Review
Headers show
Series [meta-webserver] ][PATCH 2/2] hiawatha: use -std=gnu17 for compilation | expand

Commit Message

Yoann Congal May 8, 2025, 10:35 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

hiawatha does not build under -std=gnu23 which is the default of
gcc15. Forcing -std=gnu17 fixes these build errors:
| .../tmp/work/core2-64-poky-linux/hiawatha/11.2/hiawatha-11.2/src/hiawatha.c:814:25: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
|   814 |         signal(SIGHUP,  HUP_handler);
|       |                         ^~~~~~~~~~~
|       |                         |
|       |                         void (*)(void)
| .../tmp/work/core2-64-poky-linux/hiawatha/11.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
|    88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
|       |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
| .../tmp/work/core2-64-poky-linux/hiawatha/11.2/hiawatha-11.2/src/hiawatha.c:294:6: note: 'HUP_handler' declared here
|   294 | void HUP_handler() {
|       |      ^~~~~~~~~~~
| .../tmp/work/core2-64-poky-linux/hiawatha/11.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
|    72 | typedef void (*__sighandler_t) (int);
|       |                ^~~~~~~~~~~~~~

Note: Upstream project has no published way to upstream patches.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb
index 169e385da6..098c07e954 100644
--- a/meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb
+++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb
@@ -19,6 +19,8 @@  SYSTEMD_SERVICE:${PN} = "hiawatha.service"
 
 inherit cmake update-rc.d systemd
 
+CFLAGS += "-std=gnu17"
+
 EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
                   -DENABLE_CACHE=OFF \
                   -DENABLE_DEBUG=OFF \