srelay: fix signal handler build faliure (#501871)

This commit is contained in:
Yohann Boniface
2026-03-24 01:35:59 +00:00
committed by GitHub
2 changed files with 48 additions and 1 deletions
+4 -1
View File
@@ -14,7 +14,10 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "1sn6005aqyfvrlkm5445cyyaj6h6wfyskfncfmds55x34hfyxpvl";
};
patches = [ ./arm.patch ];
patches = [
./arm.patch
./signal-handler.patch
];
buildInputs = [ libxcrypt ];
@@ -0,0 +1,44 @@
diff --git a/main.c b/main.c
index 00d1cf3..3526cfd 100644
--- a/main.c
+++ b/main.c
@@ -675,7 +675,7 @@ int main(int argc, char **argv)
msg_out(warn, "cannot open pidfile %s", pidfile);
}
- setsignal(SIGHUP, reload);
+ setsignal(SIGHUP, do_sighup);
setsignal(SIGINT, SIG_IGN);
setsignal(SIGQUIT, SIG_IGN);
setsignal(SIGILL, SIG_IGN);
@@ -690,7 +690,7 @@ int main(int argc, char **argv)
setsignal(SIGSYS, SIG_IGN);
setsignal(SIGPIPE, SIG_IGN);
setsignal(SIGALRM, SIG_IGN);
- setsignal(SIGTERM, cleanup);
+ setsignal(SIGTERM, do_sigterm);
setsignal(SIGUSR1, SIG_IGN);
setsignal(SIGUSR2, SIG_IGN);
#ifdef SIGPOLL
@@ -737,7 +737,7 @@ int main(int argc, char **argv)
}
} else {
#endif
- setsignal(SIGCHLD, reapchild);
+ setsignal(SIGCHLD, do_sigchld);
setregid(-1, PROCGID);
setreuid(-1, PROCUID);
msg_out(norm, "Starting: MAX_CH(%d)", max_child);
diff --git a/srelay.h b/srelay.h
index 3e4d5e7..35010f0 100644
--- a/srelay.h
+++ b/srelay.h
@@ -366,7 +366,7 @@ struct user_pass {
};
#ifndef SIGFUNC_DEFINED
-typedef void (*sigfunc_t)();
+typedef void (*sigfunc_t)(int);
#endif
#ifndef MAX