board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / sysklogd / 0005-Add-missing-headers-for-open-flags.patch
blob1a7ad8486813f1b8f5b14f2148e151c3395fc589
1 From 0dff338a704f4ad11a2b78871e1f2a0b8030b4d2 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Mon, 28 Nov 2016 23:12:37 +0100
4 Subject: [PATCH] Add missing headers for open() flags
6 Both pidfile.c and syslog.c use open() and its flags, but forgets to
7 include all relevant headers, causing build failures with the musl C
8 library.
10 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 ---
12 pidfile.c | 2 ++
13 syslog.c | 2 ++
14 2 files changed, 4 insertions(+)
16 diff --git a/pidfile.c b/pidfile.c
17 index e0959a0..14de56f 100644
18 --- a/pidfile.c
19 +++ b/pidfile.c
20 @@ -26,8 +26,10 @@
22 #include <stdio.h>
23 #include <unistd.h>
24 +#include <sys/types.h>
25 #include <sys/stat.h>
26 #include <sys/file.h>
27 +#include <fcntl.h>
28 #include <string.h>
29 #include <errno.h>
30 #include <signal.h>
31 diff --git a/syslog.c b/syslog.c
32 index f96b43c..d09e7aa 100644
33 --- a/syslog.c
34 +++ b/syslog.c
35 @@ -57,6 +57,8 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
36 #include <sys/file.h>
37 #include <signal.h>
38 #include <sys/syslog.h>
39 +#include <sys/stat.h>
40 +#include <fcntl.h>
41 #if 0
42 #include "syslog.h"
43 #include "pathnames.h"
44 --
45 2.7.4