unix/fiss

fixing missing includes (e3d1a0f57fe102bb5bbace085e02df18dbc9e7df)
Repositories | LICENSE

commit e3d1a0f57fe102bb5bbace085e02df18dbc9e7df
parent b2ddeefe44c62971c9ec81c5aea356fa488983c4
Author: Friedel Schon <[email protected]>
Date:   Sat, 29 Apr 2023 23:53:37 +0200

fixing missing includes

Diffstat:
Msrc/exec/finit.c9+++++----
Msrc/util.c1+
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/exec/finit.c b/src/exec/finit.c @@ -9,6 +9,7 @@ #include <string.h> #include <sys/reboot.h> #include <sys/wait.h> +#include <unistd.h> void sigblock_all(bool unblock); @@ -38,12 +39,12 @@ static bool do_reboot; static void signal_interrupt(int signum) { daemon_running = false; - do_reboot = signum == SIGINT; + do_reboot = signum == SIGINT; } int main(int argc, const char** argv) { - int ttyfd; + int ttyfd; sigset_t ss; if (getpid() != 1) { @@ -68,11 +69,11 @@ int main(int argc, const char** argv) { handle_stage1(); - if (daemon_running) { // stage1 succeed + if (daemon_running) { // stage1 succeed sigblock_all(true); struct sigaction sigact = { 0 }; - sigact.sa_handler = signal_interrupt; + sigact.sa_handler = signal_interrupt; sigaction(SIGTERM, &sigact, NULL); sigaction(SIGINT, &sigact, NULL); diff --git a/src/util.c b/src/util.c @@ -1,6 +1,7 @@ #include "util.h" #include <limits.h> +#include <stdarg.h> #include <string.h> #include <sys/stat.h> #include <unistd.h>