summaryrefslogtreecommitdiffstats
path: root/package/sysklogd/0005-Add-missing-headers-for-open-flags.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/0005-Add-missing-headers-for-open-flags.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/0005-Add-missing-headers-for-open-flags.patch')
-rw-r--r--package/sysklogd/0005-Add-missing-headers-for-open-flags.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/sysklogd/0005-Add-missing-headers-for-open-flags.patch b/package/sysklogd/0005-Add-missing-headers-for-open-flags.patch
new file mode 100644
index 0000000000..1a7ad84868
--- /dev/null
+++ b/package/sysklogd/0005-Add-missing-headers-for-open-flags.patch
@@ -0,0 +1,46 @@
+From 0dff338a704f4ad11a2b78871e1f2a0b8030b4d2 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Mon, 28 Nov 2016 23:12:37 +0100
+Subject: [PATCH] Add missing headers for open() flags
+
+Both pidfile.c and syslog.c use open() and its flags, but forgets to
+include all relevant headers, causing build failures with the musl C
+library.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ pidfile.c | 2 ++
+ syslog.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/pidfile.c b/pidfile.c
+index e0959a0..14de56f 100644
+--- a/pidfile.c
++++ b/pidfile.c
+@@ -26,8 +26,10 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
++#include <fcntl.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <signal.h>
+diff --git a/syslog.c b/syslog.c
+index f96b43c..d09e7aa 100644
+--- a/syslog.c
++++ b/syslog.c
+@@ -57,6 +57,8 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
+ #include <sys/file.h>
+ #include <signal.h>
+ #include <sys/syslog.h>
++#include <sys/stat.h>
++#include <fcntl.h>
+ #if 0
+ #include "syslog.h"
+ #include "pathnames.h"
+--
+2.7.4
+
OpenPOWER on IntegriCloud