diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2017-03-07 12:08:14 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-03-11 17:56:44 +0100 |
commit | cc9fd968ca301cf4c6cbd75edadc042ffabcea98 (patch) | |
tree | a16e233a56df87c06891b877475f0b2f0d4880f0 /meta-oe | |
parent | ff5d50b43f9729fce33360fa0e9e7ff6a51ac7cf (diff) | |
download | meta-openembedded-cc9fd968ca301cf4c6cbd75edadc042ffabcea98.tar.gz |
rsyslog: fixes musl libc build
- struct timeval is defined in sys/time.h with a musl libc.
- GLOB_BRACE is not defined in posix and thus not implemented in musl libc.
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
3 files changed, 73 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch new file mode 100644 index 000000000..23c0f258f --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 3c3c21f4735eb215206273bc714c57c969926d3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
3 | Date: Sun, 26 Feb 2017 14:10:21 +0100 | ||
4 | Subject: [PATCH] Include sys/time.h | ||
5 | |||
6 | struct timeval is defined in sys/time.h with a musl libc. | ||
7 | |||
8 | Upstream-Status: Inappropriate [musl libc specific] | ||
9 | |||
10 | Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
11 | --- | ||
12 | tests/msleep.c | 4 ---- | ||
13 | 1 file changed, 4 deletions(-) | ||
14 | |||
15 | diff --git a/tests/msleep.c b/tests/msleep.c | ||
16 | index 26a8206..ca818be 100644 | ||
17 | --- a/tests/msleep.c | ||
18 | +++ b/tests/msleep.c | ||
19 | @@ -26,11 +26,7 @@ | ||
20 | #include "config.h" | ||
21 | #include <stdio.h> | ||
22 | #include <stdlib.h> | ||
23 | -#if defined(__FreeBSD__) | ||
24 | #include <sys/time.h> | ||
25 | -#else | ||
26 | -#include <time.h> | ||
27 | -#endif | ||
28 | |||
29 | int main(int argc, char *argv[]) | ||
30 | { | ||
31 | -- | ||
32 | 1.9.1 | ||
33 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch new file mode 100644 index 000000000..7903bb1cc --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Undefine-GLOB_BRACE.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 6746e3a9615d1566bf228e9012d0841b15178810 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Liu <liu.ming50@gmail.com> | ||
3 | Date: Sun, 26 Feb 2017 13:50:33 +0100 | ||
4 | Subject: [PATCH] Undefine GLOB_BRACE | ||
5 | |||
6 | GLOB_BRACE is not defined in posix and thus not implemented in musl libc. | ||
7 | |||
8 | Fixed by defining it to 0 if it is undefined. | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl libc specific] | ||
11 | |||
12 | Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
13 | --- | ||
14 | plugins/imfile/imfile.c | 5 +++++ | ||
15 | 1 file changed, 5 insertions(+) | ||
16 | |||
17 | diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c | ||
18 | index d20471f..f9aff81 100644 | ||
19 | --- a/plugins/imfile/imfile.c | ||
20 | +++ b/plugins/imfile/imfile.c | ||
21 | @@ -85,6 +85,11 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para | ||
22 | |||
23 | #define ADD_METADATA_UNSPECIFIED -1 | ||
24 | |||
25 | +/* fixes build with musl libc */ | ||
26 | +#ifndef GLOB_BRACE | ||
27 | +#define GLOB_BRACE 0 | ||
28 | +#endif | ||
29 | + | ||
30 | /* this structure is used in pure polling mode as well one of the support | ||
31 | * structures for inotify. | ||
32 | */ | ||
33 | -- | ||
34 | 1.9.1 | ||
35 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb index 70abb18dd..d1d391bd2 100644 --- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb | |||
@@ -26,6 +26,11 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t | |||
26 | file://rsyslog-fix-ptest-not-finish.patch \ | 26 | file://rsyslog-fix-ptest-not-finish.patch \ |
27 | " | 27 | " |
28 | 28 | ||
29 | SRC_URI_append_libc-musl = " \ | ||
30 | file://0001-Undefine-GLOB_BRACE.patch \ | ||
31 | file://0001-Include-sys-time-h.patch \ | ||
32 | " | ||
33 | |||
29 | SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c" | 34 | SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c" |
30 | SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca" | 35 | SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca" |
31 | 36 | ||