summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch46
1 files changed, 0 insertions, 46 deletions
diff --git a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
deleted file mode 100644
index e7b7269f95..0000000000
--- a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 3ca0920429f7eaf8c59f9ac8afd30a43b83d95ed Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 15:03:47 +0800
4Subject: [PATCH] fix missing of __register_atfork for non-glibc builds
5
6Upstream-Status: Inappropriate [musl specific]
7
8Drop this when upgrading to 251+, systemd does not use
9__register_atfork anymore
10
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12
13---
14 src/basic/process-util.c | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/src/basic/process-util.c b/src/basic/process-util.c
18index c971852158..df6e85b1fc 100644
19--- a/src/basic/process-util.c
20+++ b/src/basic/process-util.c
21@@ -18,6 +18,9 @@
22 #if HAVE_VALGRIND_VALGRIND_H
23 #include <valgrind/valgrind.h>
24 #endif
25+#ifndef __GLIBC__
26+#include <pthread.h>
27+#endif
28
29 #include "alloc-util.h"
30 #include "architecture.h"
31@@ -1161,11 +1164,15 @@ void reset_cached_pid(void) {
32 cached_pid = CACHED_PID_UNSET;
33 }
34
35+#ifdef __GLIBC__
36 /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
37 * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
38 * libpthread, as it is part of glibc anyway. */
39 extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle);
40 extern void* __dso_handle _weak_;
41+#else
42+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
43+#endif
44
45 pid_t getpid_cached(void) {
46 static bool installed = false;