From 060ff41739cc6eb55afef1dc228ddec6bab79560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 10 Oct 2013 08:48:23 +0000 Subject: main/sysklogd: fix musl build --- main/sysklogd/fix-includes.patch | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 main/sysklogd/fix-includes.patch (limited to 'main/sysklogd/fix-includes.patch') diff --git a/main/sysklogd/fix-includes.patch b/main/sysklogd/fix-includes.patch new file mode 100644 index 0000000000..d15baf5c33 --- /dev/null +++ b/main/sysklogd/fix-includes.patch @@ -0,0 +1,122 @@ +--- sysklogd-1.5.orig/klogd.c ++++ sysklogd-1.5/klogd.c +@@ -260,11 +260,8 @@ + #include + #include + #include +-#include ++#include + #include +-#if !defined(__GLIBC__) +-#include +-#endif /* __GLIBC__ */ + #include + #include + #include +@@ -279,13 +276,8 @@ + + #define __LIBRARY__ + #include +-#if !defined(__GLIBC__) +-# define __NR_ksyslog __NR_syslog +-_syscall3(int,ksyslog,int, type, char *, buf, int, len); +-#else + #include + #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 + #include + #include +-#include ++#include + #include + #include "module.h" +-#if !defined(__GLIBC__) +-#include +-#endif /* __GLIBC__ */ + #include + #include + #include +--- sysklogd-1.5.orig/pidfile.c ++++ sysklogd-1.5/pidfile.c +@@ -25,6 +25,7 @@ + */ + + #include ++#include + #include + #include + #include +--- sysklogd-1.5.orig/syslog.c ++++ sysklogd-1.5/syslog.c +@@ -55,7 +55,6 @@ + #include + #include + #include +-#include + #include + #if 0 + #include "syslog.h" +@@ -64,6 +63,8 @@ + + #include + #include ++#include ++#include + #include + #include + #include +--- sysklogd-1.5.orig/syslogd.c ++++ sysklogd-1.5/syslogd.c +@@ -519,9 +519,9 @@ + #include + + #define SYSLOG_NAMES ++#include + #include + #include +-#include + #include + #include + #include +@@ -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) + ; -- cgit v1.2.3