From: Bruno Haible Date: Sat, 11 Feb 2023 17:48:08 +0000 (+0100) Subject: sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16. X-Git-Tag: v1.0~1678 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a23f65d414e5839fe4027adc9d506f15c67882bb;p=gnulib.git sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16. * lib/sigsegv.c (install_for): Add a cast when assigning to action.sa_sigaction. --- diff --git a/ChangeLog b/ChangeLog index 3d2f1bde3d..70763b0955 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 Fix code duplication in last commit. 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