This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch DAEMON-464 in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit c5939cfe63d9fcfb0e5950a296d6aad857ea0ad1 Author: Michael Osipov <micha...@apache.org> AuthorDate: Tue May 14 09:19:51 2024 +0200 [DAEMON-464] struct sigaction function pointer causes build failures on LLVM 15+ Co-authored-by: Matthew Ryan <mar...@akamai.com> This closes #166 and #170 --- src/native/unix/native/jsvc-unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c index e331a0f..88e071f 100644 --- a/src/native/unix/native/jsvc-unix.c +++ b/src/native/unix/native/jsvc-unix.c @@ -86,7 +86,7 @@ static int lockf(int fildes, int function, off_t size) #endif -static void handler(int sig) +static void handler(int sig, siginfo_t * sip, void *ucp) { switch (sig) { case SIGTERM: @@ -901,7 +901,7 @@ static int child(arg_data *args, home_data *data, uid_t uid, gid_t gid) /* Install signal handlers */ memset(&act, '\0', sizeof(act)); - act.sa_handler = handler; + act.sa_sigaction = handler; sigemptyset(&act.sa_mask); act.sa_flags = SA_RESTART | SA_NOCLDSTOP; @@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args, home_data *data, uid_t uid, gid_t gid) * These will be replaced in the child process. */ memset(&act, '\0', sizeof(act)); - act.sa_handler = controller; + act.sa_sigaction = controller; sigemptyset(&act.sa_mask); act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO;