]> mj.ucw.cz Git - nwho.git/blobdiff - nwhod.c
Debianized...
[nwho.git] / nwhod.c
diff --git a/nwhod.c b/nwhod.c
index e0f158e8d91d98e20f3932039571a3b96a038875..9b3cb7b4ff8082be3945fbd7591eb3bf5cc786f0 100644 (file)
--- a/nwhod.c
+++ b/nwhod.c
@@ -22,6 +22,8 @@
 #include <utmp.h>
 #include <signal.h>
 #include <dirent.h>
+#include <asm/types.h>
+#include <errno.h>
 
 #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(;;)