summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2016-09-27 08:43:53 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-10-03 19:19:57 +0200
commit08b315e1f564203666ecde95190f59547375b491 (patch)
treee9f3bfb2ec99d545cbbd66b5ec231d73ffc0f667
parent5a9b9476964adba599422b7e4358fb99096d3f14 (diff)
downloadmeta-openembedded-08b315e1f564203666ecde95190f59547375b491.tar.gz
rsyslog: fixes musl libc build
- struct timeval is defined in sys/time.h with a musl libc. - include fcntl.h without the conditional checking. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch62
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb1
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch
new file mode 100644
index 000000000..db35db06f
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch
@@ -0,0 +1,62 @@
1From b6cc506b6ad0b5dd9aa9831ed42e6759183aaf45 Mon Sep 17 00:00:00 2001
2From: Peter Liu <peter.x.liu@external.atlascopco.com>
3Date: Mon, 26 Sep 2016 17:03:57 +0200
4Subject: [PATCH] fix building with musl libc
5
6- struct timeval is defined in sys/time.h with a musl libc.
7- include fcntl.h without the conditional checking.
8
9Upstream-Status: Pending
10
11Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com>
12---
13 tests/msleep.c | 2 +-
14 tools/omfile.c | 4 +---
15 tools/pidfile.c | 2 --
16 3 files changed, 2 insertions(+), 6 deletions(-)
17
18diff --git a/tests/msleep.c b/tests/msleep.c
19index 36fa01b..ca818be 100644
20--- a/tests/msleep.c
21+++ b/tests/msleep.c
22@@ -26,7 +26,7 @@
23 #include "config.h"
24 #include <stdio.h>
25 #include <stdlib.h>
26-#include <time.h>
27+#include <sys/time.h>
28
29 int main(int argc, char *argv[])
30 {
31diff --git a/tools/omfile.c b/tools/omfile.c
32index 11eab56..765ef91 100644
33--- a/tools/omfile.c
34+++ b/tools/omfile.c
35@@ -48,9 +48,7 @@
36 #include <libgen.h>
37 #include <unistd.h>
38 #include <sys/file.h>
39-#ifdef OS_SOLARIS
40-# include <fcntl.h>
41-#endif
42+#include <fcntl.h>
43 #ifdef HAVE_ATOMIC_BUILTINS
44 # include <pthread.h>
45 #endif
46diff --git a/tools/pidfile.c b/tools/pidfile.c
47index 8298b94..188cca4 100644
48--- a/tools/pidfile.c
49+++ b/tools/pidfile.c
50@@ -36,9 +36,7 @@
51 #include <string.h>
52 #include <errno.h>
53 #include <signal.h>
54-#ifdef __sun
55 #include <fcntl.h>
56-#endif
57
58 #include "srUtils.h"
59
60--
611.9.1
62
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb
index 664ab9ff7..38bbe9cfd 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb
@@ -29,6 +29,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t
29 file://use_gnutls_certificate_type_set_priority_only_if_available.patch \ 29 file://use_gnutls_certificate_type_set_priority_only_if_available.patch \
30 file://bugfix-include-config.h-before-any-other-headers.patch \ 30 file://bugfix-include-config.h-before-any-other-headers.patch \
31 file://enable_tls_ptests.patch \ 31 file://enable_tls_ptests.patch \
32 file://fix_build_with_musl.patch \
32" 33"
33 34
34SRC_URI[md5sum] = "fa78a6e675fe78a811edcdf7eb6f1975" 35SRC_URI[md5sum] = "fa78a6e675fe78a811edcdf7eb6f1975"