mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
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>
This commit is contained in:
parent
ff5d50b43f
commit
cc9fd968ca
|
|
@ -0,0 +1,33 @@
|
|||
From 3c3c21f4735eb215206273bc714c57c969926d3d Mon Sep 17 00:00:00 2001
|
||||
From: Ming Liu <peter.x.liu@external.atlascopco.com>
|
||||
Date: Sun, 26 Feb 2017 14:10:21 +0100
|
||||
Subject: [PATCH] Include sys/time.h
|
||||
|
||||
struct timeval is defined in sys/time.h with a musl libc.
|
||||
|
||||
Upstream-Status: Inappropriate [musl libc specific]
|
||||
|
||||
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
|
||||
---
|
||||
tests/msleep.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/tests/msleep.c b/tests/msleep.c
|
||||
index 26a8206..ca818be 100644
|
||||
--- a/tests/msleep.c
|
||||
+++ b/tests/msleep.c
|
||||
@@ -26,11 +26,7 @@
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
-#if defined(__FreeBSD__)
|
||||
#include <sys/time.h>
|
||||
-#else
|
||||
-#include <time.h>
|
||||
-#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From 6746e3a9615d1566bf228e9012d0841b15178810 Mon Sep 17 00:00:00 2001
|
||||
From: Ming Liu <liu.ming50@gmail.com>
|
||||
Date: Sun, 26 Feb 2017 13:50:33 +0100
|
||||
Subject: [PATCH] Undefine GLOB_BRACE
|
||||
|
||||
GLOB_BRACE is not defined in posix and thus not implemented in musl libc.
|
||||
|
||||
Fixed by defining it to 0 if it is undefined.
|
||||
|
||||
Upstream-Status: Inappropriate [musl libc specific]
|
||||
|
||||
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
|
||||
---
|
||||
plugins/imfile/imfile.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
|
||||
index d20471f..f9aff81 100644
|
||||
--- a/plugins/imfile/imfile.c
|
||||
+++ b/plugins/imfile/imfile.c
|
||||
@@ -85,6 +85,11 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
|
||||
|
||||
#define ADD_METADATA_UNSPECIFIED -1
|
||||
|
||||
+/* fixes build with musl libc */
|
||||
+#ifndef GLOB_BRACE
|
||||
+#define GLOB_BRACE 0
|
||||
+#endif
|
||||
+
|
||||
/* this structure is used in pure polling mode as well one of the support
|
||||
* structures for inotify.
|
||||
*/
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
|
@ -26,6 +26,11 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t
|
|||
file://rsyslog-fix-ptest-not-finish.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_libc-musl = " \
|
||||
file://0001-Undefine-GLOB_BRACE.patch \
|
||||
file://0001-Include-sys-time-h.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c"
|
||||
SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user