]> mj.ucw.cz Git - nwho.git/commitdiff
Glibc portability checks.
authorMartin Mares <mj@ucw.cz>
Fri, 8 Jan 1999 13:43:24 +0000 (13:43 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 8 Jan 1999 13:43:24 +0000 (13:43 +0000)
nwho.c
nwhod.c

diff --git a/nwho.c b/nwho.c
index 94a07fe9a9054d63ec5fee1c9b2bd9db2c63c1ee..dedaecadb6cb9d71ee5c44a00933d19c6ea48ec6 100644 (file)
--- a/nwho.c
+++ b/nwho.c
@@ -14,6 +14,7 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <netinet/in.h>
+#include <asm/types.h>
 
 #include "net.h"
 
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(;;)