summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch')
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch32
1 files changed, 16 insertions, 16 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
index fc55ce85f..9e5c94336 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch
@@ -1,7 +1,7 @@
1From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001 1From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> 2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Thu, 22 Mar 2018 18:29:00 +0100 3Date: Thu, 25 Oct 2018 09:57:07 +0200
4Subject: [PATCH 4/4] musl: process-util 4Subject: [PATCH] musl: process-util
5MIME-Version: 1.0 5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8 6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit 7Content-Transfer-Encoding: 8bit
@@ -18,10 +18,10 @@ Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
18 1 file changed, 9 insertions(+) 18 1 file changed, 9 insertions(+)
19 19
20diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c 20diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c
21index 272030d..485f1db 100644 21index 1412f03..45f5049 100644
22--- a/src/systemd/src/basic/process-util.c 22--- a/src/systemd/src/basic/process-util.c
23+++ b/src/systemd/src/basic/process-util.c 23+++ b/src/systemd/src/basic/process-util.c
24@@ -36,6 +36,9 @@ 24@@ -21,6 +21,9 @@
25 #include <sys/wait.h> 25 #include <sys/wait.h>
26 #include <syslog.h> 26 #include <syslog.h>
27 #include <unistd.h> 27 #include <unistd.h>
@@ -31,7 +31,7 @@ index 272030d..485f1db 100644
31 #if 0 /* NM_IGNORED */ 31 #if 0 /* NM_IGNORED */
32 #if HAVE_VALGRIND_VALGRIND_H 32 #if HAVE_VALGRIND_VALGRIND_H
33 #include <valgrind/valgrind.h> 33 #include <valgrind/valgrind.h>
34@@ -1015,11 +1018,13 @@ static void reset_cached_pid(void) { 34@@ -1153,11 +1156,13 @@ void reset_cached_pid(void) {
35 cached_pid = CACHED_PID_UNSET; 35 cached_pid = CACHED_PID_UNSET;
36 } 36 }
37 37
@@ -39,24 +39,24 @@ index 272030d..485f1db 100644
39 /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc 39 /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
40 * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against 40 * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
41 * libpthread, as it is part of glibc anyway. */ 41 * libpthread, as it is part of glibc anyway. */
42 extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle); 42 extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle);
43 extern void* __dso_handle __attribute__ ((__weak__)); 43 extern void* __dso_handle __attribute__ ((__weak__));
44+#endif 44+#endif
45 45
46 pid_t getpid_cached(void) { 46 pid_t getpid_cached(void) {
47 pid_t current_value; 47 static bool installed = false;
48@@ -1042,7 +1047,11 @@ pid_t getpid_cached(void) { 48@@ -1186,7 +1191,11 @@ pid_t getpid_cached(void) {
49 49 * only half-documented (glibc doesn't document it but LSB does — though only superficially)
50 new_pid = getpid(); 50 * we'll check for errors only in the most generic fashion possible. */
51 51
52+#ifdef __GLIBC__ 52+#ifdef __GLIBC__
53 if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { 53 if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
54+#else 54+#else
55+ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { 55+ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
56+#endif 56+#endif
57 /* OOM? Let's try again later */ 57 /* OOM? Let's try again later */
58 cached_pid = CACHED_PID_UNSET; 58 cached_pid = CACHED_PID_UNSET;
59 return new_pid; 59 return new_pid;
60-- 60--
612.14.3 612.14.5
62 62