diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2020-12-18 09:42:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-20 00:03:01 +0000 |
commit | 1e1d26de68ed13fd53c1a16b9662ac9860dca714 (patch) | |
tree | 772fed365103a63bc33b2734aa125958ade5e4fb /meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | |
parent | 8064abb6664e16c6e0c63df3a466661f9b5b0d10 (diff) | |
download | openembedded-core-contrib-1e1d26de68ed13fd53c1a16b9662ac9860dca714.tar.gz |
systemd: update 246 -> 247
Update systemd to v247.2.
Add rule for new oomd dbus conf and for new pam.d
conf directory in /usr/lib|lib64.
Drop selinux-hook-handling-to-enumerate-nexthop.patch,
merged upstream.
Drop 0001-meson-Fix-reallocarray-check.patch,
merged upstream.
Refresh musl patches.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch new file mode 100644 index 0000000000..5cdcf84dc1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -0,0 +1,62 @@ +From e382845aed90cfe4496a8351d57d4466dd2e9a9c Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Tue, 10 Jul 2018 15:40:17 +0800 +Subject: [PATCH 15/26] distinguish XSI-compliant strerror_r from GNU-specifi + strerror_r + +XSI-compliant strerror_r and GNU-specifi strerror_r are different. + + int strerror_r(int errnum, char *buf, size_t buflen); + /* XSI-compliant */ + + char *strerror_r(int errnum, char *buf, size_t buflen); + /* GNU-specific */ + +We need to distinguish between them. Otherwise, we'll get an int value +assigned to (char *) variable, resulting in segment fault. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/journal/journal-send.c | 5 +++++ + src/libsystemd/sd-bus/bus-error.c | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +index e8e6ad555b..8ca5271d02 100644 +--- a/src/journal/journal-send.c ++++ b/src/journal/journal-send.c +@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + +diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c +index 8da2024a50..9605a9b869 100644 +--- a/src/libsystemd/sd-bus/bus-error.c ++++ b/src/libsystemd/sd-bus/bus-error.c +@@ -392,7 +392,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { + return; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(error, m, k); ++ x = m; ++#else + x = strerror_r(error, m, k); ++#endif + if (errno == ERANGE || strlen(x) >= k - 1) { + free(m); + k *= 2; +-- +2.27.0 + |