summaryrefslogtreecommitdiff
path: root/system/sysklogd/fix-includes.patch
blob: d15baf5c33caffd1e2dd6ef96e07ed738d33c328 (plain) (blame)
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
115
116
117
118
119
120
121
122
--- sysklogd-1.5.orig/klogd.c
+++ sysklogd-1.5/klogd.c
@@ -260,11 +260,8 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/stat.h>
-#if !defined(__GLIBC__)
-#include <linux/time.h>
-#endif /* __GLIBC__ */
 #include <stdarg.h>
 #include <paths.h>
 #include <stdlib.h>
@@ -279,13 +276,8 @@
 
 #define __LIBRARY__
 #include <linux/unistd.h>
-#if !defined(__GLIBC__)
-# define __NR_ksyslog __NR_syslog
-_syscall3(int,ksyslog,int, type, char *, buf, int, len);
-#else
 #include <sys/klog.h>
 #define ksyslog klogctl
-#endif
 
 #define LOG_BUFFER_SIZE 4096
 #define LOG_LINE_LENGTH 1000
--- sysklogd-1.5.orig/ksym_mod.c
+++ sysklogd-1.5/ksym_mod.c
@@ -113,12 +113,9 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 #include "module.h"
-#if !defined(__GLIBC__)
-#include <linux/time.h>
-#endif /* __GLIBC__ */
 #include <stdarg.h>
 #include <paths.h>
 #include <linux/version.h>
--- sysklogd-1.5.orig/pidfile.c
+++ sysklogd-1.5/pidfile.c
@@ -25,6 +25,7 @@
  */
 
 #include <stdio.h>
+#include <fcntl.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/file.h>
--- sysklogd-1.5.orig/syslog.c
+++ sysklogd-1.5/syslog.c
@@ -55,7 +55,6 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/file.h>
-#include <sys/signal.h>
 #include <sys/syslog.h>
 #if 0
 #include "syslog.h"
@@ -64,6 +63,8 @@
 
 #include <sys/uio.h>
 #include <sys/wait.h>
+#include <signal.h>
+#include <fcntl.h>
 #include <netdb.h>
 #include <string.h>
 #include <time.h>
--- sysklogd-1.5.orig/syslogd.c
+++ sysklogd-1.5/syslogd.c
@@ -519,9 +519,9 @@
 #include <time.h>
 
 #define SYSLOG_NAMES
+#include <errno.h>
 #include <sys/syslog.h>
 #include <sys/param.h>
-#include <sys/errno.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
@@ -823,9 +823,7 @@
 void init();
 void cfline(char *line, register struct filed *f);
 int decode(char *name, struct code *codetab);
-#if defined(__GLIBC__)
 #define dprintf mydprintf
-#endif /* __GLIBC__ */
 static void dprintf(char *, ...);
 static void allocate_log(void);
 void sighup_handler();
@@ -860,15 +858,9 @@
 	register char *p;
 #ifndef TESTING
 	ssize_t msglen;
-#endif
-#if !defined(__GLIBC__)
-	int len, num_fds;
-#else /* __GLIBC__ */
-#ifndef TESTING
 	socklen_t len;
 #endif
 	int num_fds;
-#endif /* __GLIBC__ */
 	/*
 	 * It took me quite some time to figure out how this is
 	 * supposed to work so I guess I should better write it down.
@@ -2126,7 +2118,7 @@
 	(void) signal(SIGCHLD, reapchild);	/* reset signal handler -ASP */
 	wait ((int *)0);
 #else
-	union wait status;
+	int status;
 
 	while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
 		;