Explorar o código

hiawatha: use -std=gnu17 for compilation

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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Yoann Congal hai 3 semanas
pai
achega
273c29232e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      meta-webserver/recipes-httpd/hiawatha/hiawatha_11.2.bb

+ 2 - 0
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 \