summaryrefslogtreecommitdiffstats
path: root/package/sysklogd/0002-Fix-improper-header-includes.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-11-28 23:20:58 +0100
committerPeter Korsgaard <peter@korsgaard.com>2016-12-06 11:28:43 +0100
commit55b1114f7202ff09a1d060a112760b1e2efa477c (patch)
treefb963acfd837330b0af78a9e55d8094c5dfbf9f5 /package/sysklogd/0002-Fix-improper-header-includes.patch
parent4c4756be6b34ccb20c4b879efddda5c291da52ca (diff)
downloadbuildroot-55b1114f7202ff09a1d060a112760b1e2efa477c.tar.gz
buildroot-55b1114f7202ff09a1d060a112760b1e2efa477c.zip
sysklogd: fix build on musl
This commit add a stack of small patches that make sysklogd build fine with the musl C library. Build with uClibc and glibc has been tested with those patches applied as well. The first patch is slightly rework (better description and capital letter to the title) in preparation for upstream submission. Fixes: http://autobuild.buildroot.net/results/8fa2bf73f983330884bce2e5ac31e01dee112ba9/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/sysklogd/0002-Fix-improper-header-includes.patch')
-rw-r--r--package/sysklogd/0002-Fix-improper-header-includes.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/package/sysklogd/0002-Fix-improper-header-includes.patch b/package/sysklogd/0002-Fix-improper-header-includes.patch
new file mode 100644
index 0000000000..3518ef0270
--- /dev/null
+++ b/package/sysklogd/0002-Fix-improper-header-includes.patch
@@ -0,0 +1,78 @@
+From 7a043f619a91fbb998863c08e3e5e94a4747b11d Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Mon, 28 Nov 2016 23:07:36 +0100
+Subject: [PATCH] Fix improper header includes
+
+When building with the musl C library, a number of warnings indicate
+that sysklogd is directly including headers that are considered internal
+to the C library:
+
+ - Instead of including <sys/fcntl.h>, <fcntl.h> should be included.
+
+ - Instead of including <sys/signal.h>, <signal.h> should be included.
+
+ - Instead of includeing <sys/errno.h>, <errno.h> should be included.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ klogd.c | 2 +-
+ ksym_mod.c | 2 +-
+ syslog.c | 2 +-
+ syslogd.c | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/klogd.c b/klogd.c
+index 6cc80ed..a173353 100644
+--- a/klogd.c
++++ b/klogd.c
+@@ -260,7 +260,7 @@
+ #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>
+diff --git a/ksym_mod.c b/ksym_mod.c
+index 68cd6b6..2e69d65 100644
+--- a/ksym_mod.c
++++ b/ksym_mod.c
+@@ -113,7 +113,7 @@
+ #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__)
+diff --git a/syslog.c b/syslog.c
+index bdb3ff2..f96b43c 100644
+--- a/syslog.c
++++ b/syslog.c
+@@ -55,7 +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 <signal.h>
+ #include <sys/syslog.h>
+ #if 0
+ #include "syslog.h"
+diff --git a/syslogd.c b/syslogd.c
+index ace96c8..b5e8054 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -521,7 +521,7 @@ 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>
+--
+2.7.4
+
OpenPOWER on IntegriCloud