diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2016-09-27 08:43:53 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-10-03 19:19:57 +0200 |
commit | 08b315e1f564203666ecde95190f59547375b491 (patch) | |
tree | e9f3bfb2ec99d545cbbd66b5ec231d73ffc0f667 /meta-oe/recipes-extended/rsyslog | |
parent | 5a9b9476964adba599422b7e4358fb99096d3f14 (diff) | |
download | meta-openembedded-contrib-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>
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog')
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch | 62 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog_7.6.7.bb | 1 |
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 0000000000..db35db06f2 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/fix_build_with_musl.patch @@ -0,0 +1,62 @@ +From b6cc506b6ad0b5dd9aa9831ed42e6759183aaf45 Mon Sep 17 00:00:00 2001 +From: Peter Liu <peter.x.liu@external.atlascopco.com> +Date: Mon, 26 Sep 2016 17:03:57 +0200 +Subject: [PATCH] fix building with musl libc + +- struct timeval is defined in sys/time.h with a musl libc. +- include fcntl.h without the conditional checking. + +Upstream-Status: Pending + +Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com> +--- + tests/msleep.c | 2 +- + tools/omfile.c | 4 +--- + tools/pidfile.c | 2 -- + 3 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/tests/msleep.c b/tests/msleep.c +index 36fa01b..ca818be 100644 +--- a/tests/msleep.c ++++ b/tests/msleep.c +@@ -26,7 +26,7 @@ + #include "config.h" + #include <stdio.h> + #include <stdlib.h> +-#include <time.h> ++#include <sys/time.h> + + int main(int argc, char *argv[]) + { +diff --git a/tools/omfile.c b/tools/omfile.c +index 11eab56..765ef91 100644 +--- a/tools/omfile.c ++++ b/tools/omfile.c +@@ -48,9 +48,7 @@ + #include <libgen.h> + #include <unistd.h> + #include <sys/file.h> +-#ifdef OS_SOLARIS +-# include <fcntl.h> +-#endif ++#include <fcntl.h> + #ifdef HAVE_ATOMIC_BUILTINS + # include <pthread.h> + #endif +diff --git a/tools/pidfile.c b/tools/pidfile.c +index 8298b94..188cca4 100644 +--- a/tools/pidfile.c ++++ b/tools/pidfile.c +@@ -36,9 +36,7 @@ + #include <string.h> + #include <errno.h> + #include <signal.h> +-#ifdef __sun + #include <fcntl.h> +-#endif + + #include "srUtils.h" + +-- +1.9.1 + 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 664ab9ff7f..38bbe9cfd9 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 file://use_gnutls_certificate_type_set_priority_only_if_available.patch \ file://bugfix-include-config.h-before-any-other-headers.patch \ file://enable_tls_ptests.patch \ + file://fix_build_with_musl.patch \ " SRC_URI[md5sum] = "fa78a6e675fe78a811edcdf7eb6f1975" |