summaryrefslogtreecommitdiff
path: root/package/sysklogd/0002-Fix-improper-header-includes.patch
blob: 3518ef0270dbb4d82bbb078e10b29115d3ce84d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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