summaryrefslogtreecommitdiffstats
path: root/package/sysklogd/0003-Remove-include-of-linux-time.h.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/0003-Remove-include-of-linux-time.h.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/0003-Remove-include-of-linux-time.h.patch')
-rw-r--r--package/sysklogd/0003-Remove-include-of-linux-time.h.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/sysklogd/0003-Remove-include-of-linux-time.h.patch b/package/sysklogd/0003-Remove-include-of-linux-time.h.patch
new file mode 100644
index 0000000000..374d89bd05
--- /dev/null
+++ b/package/sysklogd/0003-Remove-include-of-linux-time.h.patch
@@ -0,0 +1,50 @@
+From f4926a61ba2d3766255dd996bf0315bc8fa0c528 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Mon, 28 Nov 2016 23:09:03 +0100
+Subject: [PATCH] Remove include of <linux/time.h>
+
+klogd.c and ksym_mod.c currently include <linux/time.h> if GLIBC is not
+defined. Unfortunately, this breaks badly with the musl C library: this
+C library is not glibc so it doesn't define GLIBC, but it does have a
+definition of "struct timespec" in its header file, which conflict with
+the one provided by the Linux kernel headers.
+
+So, this commit simply gets rid of this header inclusion.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ klogd.c | 3 ---
+ ksym_mod.c | 3 ---
+ 2 files changed, 6 deletions(-)
+
+diff --git a/klogd.c b/klogd.c
+index a173353..6505d96 100644
+--- a/klogd.c
++++ b/klogd.c
+@@ -262,9 +262,6 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdlib.h>
+diff --git a/ksym_mod.c b/ksym_mod.c
+index 2e69d65..6e26da1 100644
+--- a/ksym_mod.c
++++ b/ksym_mod.c
+@@ -116,9 +116,6 @@
+ #include <fcntl.h>
+ #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>
+--
+2.7.4
+
OpenPOWER on IntegriCloud