diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch')
-rw-r--r-- | external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch new file mode 100644 index 00000000..9e5c9433 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch @@ -0,0 +1,62 @@ +From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 25 Oct 2018 09:57:07 +0200 +Subject: [PATCH] musl: process-util +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Stolen from [1] and prettyfied slightly + +[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/systemd/src/basic/process-util.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c +index 1412f03..45f5049 100644 +--- a/src/systemd/src/basic/process-util.c ++++ b/src/systemd/src/basic/process-util.c +@@ -21,6 +21,9 @@ + #include <sys/wait.h> + #include <syslog.h> + #include <unistd.h> ++#ifndef __GLIBC__ ++#include <pthread.h> ++#endif + #if 0 /* NM_IGNORED */ + #if HAVE_VALGRIND_VALGRIND_H + #include <valgrind/valgrind.h> +@@ -1153,11 +1156,13 @@ void reset_cached_pid(void) { + cached_pid = CACHED_PID_UNSET; + } + ++#ifdef __GLIBC__ + /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc + * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against + * libpthread, as it is part of glibc anyway. */ + extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); + extern void* __dso_handle __attribute__ ((__weak__)); ++#endif + + pid_t getpid_cached(void) { + static bool installed = false; +@@ -1186,7 +1191,11 @@ pid_t getpid_cached(void) { + * only half-documented (glibc doesn't document it but LSB does — though only superficially) + * we'll check for errors only in the most generic fashion possible. */ + ++#ifdef __GLIBC__ + if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { ++#else ++ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { ++#endif + /* OOM? Let's try again later */ + cached_pid = CACHED_PID_UNSET; + return new_pid; +-- +2.14.5 + |