From a1bc744bd23d3bf01f1ec4e7b8ac374201fc792a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 8 Jan 1999 13:43:24 +0000 Subject: [PATCH] Glibc portability checks. --- nwho.c | 1 + nwhod.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nwho.c b/nwho.c index 94a07fe..dedaeca 100644 --- a/nwho.c +++ b/nwho.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "net.h" diff --git a/nwhod.c b/nwhod.c index e0f158e..9b3cb7b 100644 --- a/nwhod.c +++ b/nwhod.c @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "net.h" @@ -329,15 +331,17 @@ tick(int unused) { } -static struct sigaction sigact = { tick, 0, 0, NULL }; - static void server(void) { + static struct sigaction sigact; + net_init(NULL); if (chdir(YWHO_SPOOL_DIR) < 0) die("chdir(" YWHO_SPOOL_DIR "): %m"); cleanup(); + bzero(&sigact, sizeof(sigact)); + sigact.sa_handler = tick; sigaction(SIGALRM, &sigact, NULL); now = time(NULL); for(;;) -- 2.39.2