Fix archaic #include statements, for building with musl libc

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2018-08-05 16:51:13 +02:00
parent 9f21a8a0f5
commit 53c4dd817d
5 changed files with 13 additions and 26 deletions

View File

@ -260,11 +260,12 @@
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <sys/fcntl.h>
#ifdef SYSV
#include <fcntl.h>
#else
#include <sys/msgbuf.h>
#endif
#include <sys/stat.h>
#if !defined(__GLIBC__)
#include <linux/time.h>
#endif /* __GLIBC__ */
#include <stdarg.h>
#include <paths.h>
#include <stdlib.h>
@ -277,13 +278,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

View File

@ -113,12 +113,13 @@
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <sys/fcntl.h>
#ifdef SYSV
#include <fcntl.h>
#else
#include <sys/msgbuf.h>
#endif
#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>

View File

@ -31,6 +31,7 @@
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
/* read_pid
*

View File

@ -55,13 +55,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
#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"
#include "pathnames.h"
#endif
#include <sys/uio.h>
#include <sys/wait.h>
#include <netdb.h>
@ -72,6 +66,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
#include <stdarg.h>
#include <paths.h>
#include <stdio.h>
#include <fcntl.h>
#define _PATH_LOGNAME "/dev/log"

View File

@ -524,9 +524,7 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88";
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef SYSV
#include <sys/types.h>
#endif
#include <utmp.h>
#include <ctype.h>
#include <string.h>
@ -537,17 +535,13 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88";
#define SYSLOG_NAMES
#include <sys/syslog.h>
#include <sys/param.h>
#include <sys/errno.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/file.h>
#ifdef SYSV
#include <fcntl.h>
#else
#include <sys/msgbuf.h>
#endif
#include <sys/uio.h>
#include <sys/un.h>
#include <sys/time.h>