summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch60
1 files changed, 0 insertions, 60 deletions
diff --git a/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
deleted file mode 100644
index 48fd007e11..0000000000
--- a/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 4938705454cf46cfe8deac8ce457d5d2432cbead 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] 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(+)
-
-Index: systemd-stable/src/journal/journal-send.c
-===================================================================
---- systemd-stable.orig/src/journal/journal-send.c
-+++ systemd-stable/src/journal/journal-send.c
-@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co
- 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];
-
-Index: systemd-stable/src/libsystemd/sd-bus/bus-error.c
-===================================================================
---- systemd-stable.orig/src/libsystemd/sd-bus/bus-error.c
-+++ systemd-stable/src/libsystemd/sd-bus/bus-error.c
-@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_er
- 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;