* [PATCH] gdb: fix build with gcc-15 and -std=c23
@ 2024-12-16 12:48 Rudi Heitbaum
2024-12-16 13:15 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Rudi Heitbaum @ 2024-12-16 12:48 UTC (permalink / raw)
To: gdb-patches; +Cc: rudi
int signum is required to be passed to SigHandler.
readline-8.2 has updated this typedef in the upstream 8.2
fixes:
../../../readline/readline/signals.c: In function 'rl_set_signals':
../../../readline/readline/signals.c:480:40: error: passing argument 2 of 'rl_maybe_set_sighandler' from incompatible pointer type [-Wincompatible-pointer-types]
480 | rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
| ^~~~~~~~~~~~~~~~~
| |
| void (*)(int)
../../../readline/readline/signals.c:407:47: note: expected 'void (*)(void)' but argument is of type 'void (*)(int)'
407 | rl_maybe_set_sighandler (int sig, SigHandler *handler, sighandler_cxt *ohandler)
| ~~~~~~~~~~~~^~~~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
readline/readline/signals.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/readline/readline/signals.c b/readline/readline/signals.c
index 8fedc370a1a..28f5366030c 100644
--- a/readline/readline/signals.c
+++ b/readline/readline/signals.c
@@ -64,7 +64,7 @@
/* This typedef is equivalent to the one for Function; it allows us
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
-typedef RETSIGTYPE SigHandler ();
+typedef RETSIGTYPE SigHandler (int);
#if defined (HAVE_POSIX_SIGNALS)
typedef struct sigaction sighandler_cxt;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-17 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-16 12:48 [PATCH] gdb: fix build with gcc-15 and -std=c23 Rudi Heitbaum
2024-12-16 13:15 ` Andreas Schwab
2024-12-17 10:25 ` Rudi Heitbaum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox