aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/networkmanager/files/1.28.0/0004-Fix-pthread-support-for-non-glibc-users.patch')
-rw-r--r--net-misc/networkmanager/files/1.28.0/0004-Fix-pthread-support-for-non-glibc-users.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/net-misc/networkmanager/files/1.28.0/0004-Fix-pthread-support-for-non-glibc-users.patch b/net-misc/networkmanager/files/1.28.0/0004-Fix-pthread-support-for-non-glibc-users.patch
deleted file mode 100644
index 6ac79bef..00000000
--- a/net-misc/networkmanager/files/1.28.0/0004-Fix-pthread-support-for-non-glibc-users.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From edd98123a8aa41c799331d6ab844d026ecff2c46 Mon Sep 17 00:00:00 2001
-From:
-Date: Thu, 11 Mar 2021 07:43:23 -0600
-Subject: [PATCH 4/6] Fix pthread support for non glibc users
-
----
- shared/systemd/src/basic/process-util.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c
-index 03ca04e..1e97688 100644
---- a/shared/systemd/src/basic/process-util.c
-+++ b/shared/systemd/src/basic/process-util.c
-@@ -17,6 +17,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>
-@@ -1152,11 +1155,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 _weak_;
-+#endif
-
- pid_t getpid_cached(void) {
- static bool installed = false;
-@@ -1185,7 +1190,12 @@ 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. */
-
-- if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
-+ #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.26.2
-