Skip to content

Commit

Permalink
[DAEMON-464] struct sigaction function pointer causes build failures …
Browse files Browse the repository at this point in the history
…on LLVM 15+

Co-authored-by: Matthew Ryan <maryan@akamai.com>

This closes #166 and #170
  • Loading branch information
michael-o committed May 14, 2024
1 parent 14e2a94 commit c5939cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/native/unix/native/jsvc-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c5939cf

Please sign in to comment.