diff --git a/packages/sysutils/udevil/patches/0003-fix-update-command_interrupt-and-command_monitor_fin.patch b/packages/sysutils/udevil/patches/0003-fix-update-command_interrupt-and-command_monitor_fin.patch new file mode 100644 index 0000000000..a8c1d50f83 --- /dev/null +++ b/packages/sysutils/udevil/patches/0003-fix-update-command_interrupt-and-command_monitor_fin.patch @@ -0,0 +1,51 @@ +From 1c98aa82b0bc0f1ec37d0096c735d8ceb9e0b2b1 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Tue, 19 Nov 2024 22:50:46 +0000 +Subject: [PATCH] fix: update command_interrupt and command_monitor_finalize + functions to pass sigint + +This fixes compile error with gcc-15 + +/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) + | ~~~~~~~~~~~~~~~^~~~~~~~~ +../../src/udevil.c:5033:21: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] + 5033 | signal(SIGINT, command_monitor_finalize ); + | ^~~~~~~~~~~~~~~~~~~~~~~~ + | | + | void (*)(void) +/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) + | ~~~~~~~~~~~~~~~^~~~~~~~~ +../../src/udevil.c: In function 'main': +../../src/udevil.c:5176:22: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] + 5176 | signal( SIGTERM, command_interrupt ); + | ^~~~~~~~~~~~~~~~~ + | | + | void (*)(void) +--- + src/udevil.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/udevil.c b/src/udevil.c +index c9f03f0..d56ff70 100644 +--- a/src/udevil.c ++++ b/src/udevil.c +@@ -4950,7 +4950,7 @@ static int command_info( CommandData* data ) + return ret; + } + +-void command_monitor_finalize() ++void command_monitor_finalize(int signum) + { + //if (signal == SIGINT || signal == SIGTERM) + //printf( "\nudevil: SIGINT || SIGTERM\n"); +@@ -5068,7 +5068,7 @@ static int command_monitor() + return 1; + } + +-void command_interrupt() ++void command_interrupt(int signum) + { + if ( udev ) + {