diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-12 19:14:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-18 10:18:06 +0000 |
commit | 5aadf4ec8f278fe5f098ead1b04a9da5de3721d3 (patch) | |
tree | 6ce18be92d48fe22dba17a2ca7a05e846ff6e18b /meta/recipes-extended/sysklogd | |
parent | 06a0adbb25b8ee83f64be78a2fb66fed5fa7ecf5 (diff) | |
download | poky-5aadf4ec8f278fe5f098ead1b04a9da5de3721d3.tar.gz |
sysklogd: Fix 2.0.3 upgrade fallouts on musl
(From OE-Core rev: 59141d95f19c64ef3908e194fb55f240f8be887a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sysklogd')
3 files changed, 75 insertions, 0 deletions
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 0000000000..b2d45c0a0a --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 8c7995ac8da99eed55bf5410c558b1f0a74998d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 7 Dec 2019 10:27:28 -0800 | ||
4 | Subject: [PATCH 1/2] Remove __BEGIN_DECLS/__END_DECLS | ||
5 | |||
6 | The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and | ||
7 | are not defined in any standard. Using them fails build on musl | ||
8 | libc, its better to avoid them | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/syslog.h | 8 ++++++-- | ||
14 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/src/syslog.h b/src/syslog.h | ||
17 | index 4fb7627..120a18f 100644 | ||
18 | --- a/src/syslog.h | ||
19 | +++ b/src/syslog.h | ||
20 | @@ -221,7 +221,9 @@ struct syslog_data { | ||
21 | .log_mask = 0xff, \ | ||
22 | } | ||
23 | |||
24 | -__BEGIN_DECLS | ||
25 | +#ifdef __cplusplus | ||
26 | +extern "C" { | ||
27 | +#endif | ||
28 | void openlog (const char *, int, int); | ||
29 | void closelog (void); | ||
30 | |||
31 | @@ -245,7 +247,9 @@ void syslogp_r (int, struct syslog_data *, const char *, const char *, | ||
32 | const char *, ...); | ||
33 | void vsyslogp_r (int, struct syslog_data *, const char *, const char *, | ||
34 | const char *, va_list); | ||
35 | -__END_DECLS | ||
36 | +#ifdef __cplusplus | ||
37 | +} | ||
38 | +#endif | ||
39 | |||
40 | #else /* !__KERNEL__ */ | ||
41 | |||
42 | -- | ||
43 | 2.24.0 | ||
44 | |||
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 0000000000..799a7a4c4c --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 10cff4ba2d09b30f8f1967f910e8ab08447a8add Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 7 Dec 2019 10:31:04 -0800 | ||
4 | Subject: [PATCH 2/2] include sys/types.h for off_t | ||
5 | |||
6 | Fixes | ||
7 | error: unknown type name 'off_t' | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/compat.h | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/compat.h b/src/compat.h | ||
16 | index a867636..1ef1bf0 100644 | ||
17 | --- a/src/compat.h | ||
18 | +++ b/src/compat.h | ||
19 | @@ -34,6 +34,7 @@ | ||
20 | #include <pthread.h> | ||
21 | #include <stdlib.h> | ||
22 | #include <string.h> | ||
23 | +#include <sys/types.h> | ||
24 | |||
25 | /* | ||
26 | * The following macro is used to remove const cast-away warnings | ||
27 | -- | ||
28 | 2.24.0 | ||
29 | |||
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index b90911af2b..07edf40326 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 \ | |||
14 | inherit update-rc.d update-alternatives systemd autotools | 14 | inherit update-rc.d update-alternatives systemd autotools |
15 | 15 | ||
16 | SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ | 16 | SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ |
17 | file://0001-Remove-__BEGIN_DECLS-__END_DECLS.patch \ | ||
18 | file://0002-include-sys-types.h-for-off_t.patch \ | ||
17 | file://sysklogd \ | 19 | file://sysklogd \ |
18 | " | 20 | " |
19 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |