]> git.wh0rd.org - patches.git/blame - watchdog-headers.patch
more random patches. who knows.
[patches.git] / watchdog-headers.patch
CommitLineData
5e993f12 1--- src/nfsmount.c
2+++ src/nfsmount.c
3@@ -39,6 +39,7 @@
4 #include <string.h>
5 #include <errno.h>
6 #include <netdb.h>
7+#include <time.h>
8 #include <rpc/rpc.h>
9 #include <rpc/pmap_prot.h>
10 #include <rpc/pmap_clnt.h>
11--- src/pidfile.c
12+++ src/pidfile.c
13@@ -6,6 +6,10 @@
14
15 #include <errno.h>
16 #include <fcntl.h>
17+#include <unistd.h>
18+#include <sys/types.h>
19+#include <stdlib.h>
20+#include <signal.h>
21 #include "extern.h"
22 #include "watch_err.h"
23
24--- src/shutdown.c
25+++ src/shutdown.c
26@@ -4,6 +4,10 @@
27 #include "config.h"
28 #endif
29
30+#ifndef _GNU_SOURCE
31+#define _GNU_SOURCE /* for getsid() */
32+#endif
33+
34 #include <dirent.h>
35 #include <errno.h>
36 #include <fcntl.h>
37@@ -14,6 +18,7 @@
38 #include <signal.h>
39 #include <string.h>
40 #include <stdlib.h>
41+#include <time.h>
42 #include <utmp.h>
43 #include <sys/mman.h>
44 #include <sys/param.h>
45--- src/test_binary.c
46+++ src/test_binary.c
47@@ -7,6 +7,7 @@
48 #include <errno.h>
49 #include <unistd.h>
50 #include <stdlib.h>
51+#include <time.h>
52 #include <sys/wait.h>
53 #include "extern.h"
54 #include "watch_err.h"
55--- src/watchdog.c
56+++ src/watchdog.c
57@@ -11,6 +11,10 @@
58 #include "config.h"
59 #endif
60
61+#ifndef _GNU_SOURCE
62+#define _GNU_SOURCE
63+#endif
64+
65 #include "extern.h"
66
67 #include <errno.h>
68@@ -22,8 +26,8 @@
69 #include <stdlib.h>
70 #include <arpa/inet.h>
71 #include <sys/mman.h>
72+#include <sys/stat.h>
73 #include <sys/wait.h>
74-#define __USE_GNU
75 #include <string.h>
76
77 #if !defined(__GLIBC__) /* __GLIBC__ */
78--- src/wd_keepalive.c
79+++ src/wd_keepalive.c
80@@ -15,6 +15,10 @@
81 #include "config.h"
82 #endif
83
84+#ifndef _GNU_SOURCE
85+#define _GNU_SOURCE
86+#endif
87+
88 #include <errno.h>
89 #include <fcntl.h>
90 #include <getopt.h>
91@@ -24,7 +28,6 @@
92 #include <stdlib.h>
93 #include <sys/mman.h>
94 #include <sys/wait.h>
95-#define __USE_GNU
96 #include <string.h>
97 #include <syslog.h>
98