From c8294ce99eb7707639d07f57d17edb3447f3843c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 11 Feb 2023 18:48:08 +0100 Subject: [PATCH] =?utf8?q?sigsegv:=20Fix=20a=20compilation=20error=20on=20?= =?utf8?q?OpenBSD=20with=20clang=20=E2=89=A5=2016.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/sigsegv.c (install_for): Add a cast when assigning to action.sa_sigaction. --- ChangeLog | 6 ++++++ lib/sigsegv.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 657c1a2b2b..c761045a94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-02-11 Bruno Haible + + sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16. + * lib/sigsegv.c (install_for): Add a cast when assigning to + action.sa_sigaction. + 2023-02-10 Bruno Haible mkfifoat: Fix crash on macOS 12. diff --git a/lib/sigsegv.c b/lib/sigsegv.c index 29c452dbe0..5e943e4d5d 100644 --- a/lib/sigsegv.c +++ b/lib/sigsegv.c @@ -1211,7 +1211,7 @@ install_for (int sig) struct sigaction action; # ifdef SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO - action.sa_sigaction = &sigsegv_handler; + action.sa_sigaction = (void (*) (int, siginfo_t *, void *)) &sigsegv_handler; # else action.sa_handler = (void (*) (int)) &sigsegv_handler; # endif -- 2.39.5