summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-12-18 09:42:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-20 00:03:01 +0000
commit1e1d26de68ed13fd53c1a16b9662ac9860dca714 (patch)
tree772fed365103a63bc33b2734aa125958ade5e4fb /meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
parent8064abb6664e16c6e0c63df3a466661f9b5b0d10 (diff)
downloadopenembedded-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/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.patch45
1 files changed, 45 insertions, 0 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
new file mode 100644
index 0000000000..76cc75cf6a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -0,0 +1,45 @@
+From d8e4f0aa1760e4c7bb8476beecd35025c9cbb95a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Mon, 25 Feb 2019 15:03:47 +0800
+Subject: [PATCH 09/26] fix missing of __register_atfork for non-glibc builds
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/basic/process-util.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index 0851613fc9..4417101569 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -18,6 +18,9 @@
+ #if HAVE_VALGRIND_VALGRIND_H
+ #include <valgrind/valgrind.h>
+ #endif
++#ifndef __GLIBC__
++#include <pthread.h>
++#endif
+
+ #include "alloc-util.h"
+ #include "architecture.h"
+@@ -1143,11 +1146,15 @@ 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 _weak_;
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
+
+ pid_t getpid_cached(void) {
+ static bool installed = false;
+--
+2.27.0
+