[oe-commits] [openembedded-core] 02/04: sysklogd: Fix 2.0.3 upgrade fallouts on musl

git at git.openembedded.org git at git.openembedded.org
Wed Dec 18 10:20:23 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 59141d95f19c64ef3908e194fb55f240f8be887a
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu Dec 12 19:14:17 2019 +0100

    sysklogd: Fix 2.0.3 upgrade fallouts on musl
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Cc: Alexander Kanavin <alex.kanavin at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../0001-Remove-__BEGIN_DECLS-__END_DECLS.patch    | 44 ++++++++++++++++++++++
 .../files/0002-include-sys-types.h-for-off_t.patch | 29 ++++++++++++++
 meta/recipes-extended/sysklogd/sysklogd.inc        |  2 +
 3 files changed, 75 insertions(+)

diff --git a/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
new file mode 100644
index 0000000..b2d45c0
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
@@ -0,0 +1,44 @@
+From 8c7995ac8da99eed55bf5410c558b1f0a74998d0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 7 Dec 2019 10:27:28 -0800
+Subject: [PATCH 1/2] Remove __BEGIN_DECLS/__END_DECLS
+
+The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and
+are not defined in any standard. Using them fails build on musl
+libc, its better to avoid them
+
+Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/syslog.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/syslog.h b/src/syslog.h
+index 4fb7627..120a18f 100644
+--- a/src/syslog.h
++++ b/src/syslog.h
+@@ -221,7 +221,9 @@ struct syslog_data {
+     .log_mask = 0xff, \
+ }
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void	openlog    (const char *, int, int);
+ void	closelog   (void);
+ 
+@@ -245,7 +247,9 @@ void	syslogp_r  (int, struct syslog_data *, const char *, const char *,
+ 		    const char *, ...);
+ void	vsyslogp_r (int, struct syslog_data *, const char *, const char *,
+ 		    const char *, va_list);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #else /* !__KERNEL__ */
+ 
+-- 
+2.24.0
+
diff --git a/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
new file mode 100644
index 0000000..799a7a4
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
@@ -0,0 +1,29 @@
+From 10cff4ba2d09b30f8f1967f910e8ab08447a8add Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 7 Dec 2019 10:31:04 -0800
+Subject: [PATCH 2/2] include sys/types.h for off_t
+
+Fixes
+error: unknown type name 'off_t'
+
+Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/compat.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/compat.h b/src/compat.h
+index a867636..1ef1bf0 100644
+--- a/src/compat.h
++++ b/src/compat.h
+@@ -34,6 +34,7 @@
+ #include <pthread.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+ 
+ /*
+  * The following macro is used to remove const cast-away warnings
+-- 
+2.24.0
+
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index b90911a..07edf40 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -14,6 +14,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 inherit update-rc.d update-alternatives systemd autotools
 
 SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
+           file://0001-Remove-__BEGIN_DECLS-__END_DECLS.patch \
+           file://0002-include-sys-types.h-for-off_t.patch \
            file://sysklogd \
            "
 S = "${WORKDIR}/git"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list