1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
Index: watchdog-5.3.1/src/fstab.c
===================================================================
--- watchdog-5.3.1.orig/src/fstab.c
+++ watchdog-5.3.1/src/fstab.c
@@ -4,6 +4,7 @@
#include "config.h"
#endif
+#define _GNU_SOURCE /* for strsignal() */
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
Index: watchdog-5.3.1/src/nfsmount.c
===================================================================
--- watchdog-5.3.1.orig/src/nfsmount.c
+++ watchdog-5.3.1/src/nfsmount.c
@@ -43,6 +43,7 @@
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
#include <sys/socket.h>
+#include <time.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <sys/stat.h>
Index: watchdog-5.3.1/src/pidfile.c
===================================================================
--- watchdog-5.3.1.orig/src/pidfile.c
+++ watchdog-5.3.1/src/pidfile.c
@@ -6,6 +6,10 @@
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <signal.h>
#include "extern.h"
#include "watch_err.h"
Index: watchdog-5.3.1/src/shutdown.c
===================================================================
--- watchdog-5.3.1.orig/src/shutdown.c
+++ watchdog-5.3.1/src/shutdown.c
@@ -4,6 +4,8 @@
#include "config.h"
#endif
+#define _GNU_SOURCE /* for getsid() */
+
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
@@ -14,6 +16,7 @@
#include <signal.h>
#include <string.h>
#include <stdlib.h>
+#include <time.h>
#include <utmp.h>
#include <sys/mman.h>
#include <sys/param.h>
Index: watchdog-5.3.1/src/test_binary.c
===================================================================
--- watchdog-5.3.1.orig/src/test_binary.c
+++ watchdog-5.3.1/src/test_binary.c
@@ -8,6 +8,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <time.h>
#include "extern.h"
#include "watch_err.h"
Index: watchdog-5.3.1/src/watchdog.c
===================================================================
--- watchdog-5.3.1.orig/src/watchdog.c
+++ watchdog-5.3.1/src/watchdog.c
@@ -13,6 +13,8 @@
#include "extern.h"
+#include <sys/stat.h>
+#include <libgen.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
@@ -23,7 +25,6 @@
#include <arpa/inet.h>
#include <sys/mman.h>
#include <sys/wait.h>
-#define __USE_GNU
#include <string.h>
#if !defined(__GLIBC__) /* __GLIBC__ */
Index: watchdog-5.3.1/src/wd_keepalive.c
===================================================================
--- watchdog-5.3.1.orig/src/wd_keepalive.c
+++ watchdog-5.3.1/src/wd_keepalive.c
@@ -14,6 +14,7 @@
#include "config.h"
#endif
+#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
@@ -22,7 +23,7 @@
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/wait.h>
-#define __USE_GNU
+#include <unistd.h>
#include <string.h>
#include <syslog.h>
|