From: Rudi Heitbaum <rudi@heitbaum.com>
To: gdb-patches@sourceware.org
Cc: rudi@heitbaum.com
Subject: [PATCH] gdb: fix build with gcc-15 and -std=c23
Date: Mon, 16 Dec 2024 12:48:36 +0000 [thread overview]
Message-ID: <Z2AhpIX91cA287OP@b57525fa3d4c> (raw)
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
next reply other threads:[~2024-12-16 12:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 12:48 Rudi Heitbaum [this message]
2024-12-16 13:15 ` Andreas Schwab
2024-12-17 10:25 ` Rudi Heitbaum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2AhpIX91cA287OP@b57525fa3d4c \
--to=rudi@heitbaum.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox