1 # this patch both fixes some include paths as well as removes glibc
2 # gates around defines that musl-libc also depends on.
3 diff -u sysklogd-1.5.1.orig/klogd.c sysklogd-1.5.1/klogd.c
4 --- sysklogd-1.5.1.orig/klogd.c 2014-10-04 15:47:18.000000000 -0400
5 +++ sysklogd-1.5.1/klogd.c 2021-01-18 23:09:23.000000000 -0500
10 -#include <sys/fcntl.h>
13 -#if !defined(__GLIBC__)
14 -#include <linux/time.h>
15 -#endif /* __GLIBC__ */
22 #include <linux/unistd.h>
23 -#if !defined(__GLIBC__)
24 -# define __NR_ksyslog __NR_syslog
25 -_syscall3(int,ksyslog,int, type, char *, buf, int, len);
28 #define ksyslog klogctl
31 #define LOG_BUFFER_SIZE 4096
32 #define LOG_LINE_LENGTH 1000
33 diff -u sysklogd-1.5.1.orig/ksym_mod.c sysklogd-1.5.1/ksym_mod.c
34 --- sysklogd-1.5.1.orig/ksym_mod.c 2014-10-04 15:47:18.000000000 -0400
35 +++ sysklogd-1.5.1/ksym_mod.c 2021-01-18 23:09:57.000000000 -0500
40 -#include <sys/fcntl.h>
44 -#if !defined(__GLIBC__)
45 -#include <linux/time.h>
46 -#endif /* __GLIBC__ */
49 #include <linux/version.h>
50 diff -u sysklogd-1.5.1.orig/pidfile.c sysklogd-1.5.1/pidfile.c
51 --- sysklogd-1.5.1.orig/pidfile.c 2014-10-04 15:47:18.000000000 -0400
52 +++ sysklogd-1.5.1/pidfile.c 2021-01-18 23:23:55.000000000 -0500
61 diff -u sysklogd-1.5.1.orig/syslog.c sysklogd-1.5.1/syslog.c
62 --- sysklogd-1.5.1.orig/syslog.c 2014-10-04 15:47:18.000000000 -0400
63 +++ sysklogd-1.5.1/syslog.c 2021-01-18 23:11:45.000000000 -0500
65 #include <sys/types.h>
66 #include <sys/socket.h>
68 -#include <sys/signal.h>
69 #include <sys/syslog.h>
81 diff -u sysklogd-1.5.1.orig/syslogd.c sysklogd-1.5.1/syslogd.c
82 --- sysklogd-1.5.1.orig/syslogd.c 2014-10-04 15:47:18.000000000 -0400
83 +++ sysklogd-1.5.1/syslogd.c 2021-01-18 23:13:25.000000000 -0500
89 #include <sys/syslog.h>
90 #include <sys/param.h>
91 -#include <sys/errno.h>
92 #include <sys/ioctl.h>
97 void cfline(char *line, register struct filed *f);
98 int decode(char *name, struct code *codetab);
99 -#if defined(__GLIBC__)
100 #define dprintf mydprintf
101 -#endif /* __GLIBC__ */
102 static void dprintf(char *, ...);
103 static void allocate_log(void);
104 void sighup_handler();
110 -#if !defined(__GLIBC__)
112 -#else /* __GLIBC__ */
117 -#endif /* __GLIBC__ */
119 * It took me quite some time to figure out how this is
120 * supposed to work so I guess I should better write it down.