From: Martin Mares Date: Fri, 8 Jan 1999 13:43:24 +0000 (+0000) Subject: Glibc portability checks. X-Git-Tag: v1.13~44 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a1bc744bd23d3bf01f1ec4e7b8ac374201fc792a;p=nwho.git Glibc portability checks. --- 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(;;)