summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
diff options
context:
space:
mode:
authorYi Fan Yu <yifan.yu@windriver.com>2021-04-16 11:36:47 -0400
committerKhem Raj <raj.khem@gmail.com>2021-04-17 07:43:10 -0700
commit01d3f9daa0c320070269e9a27a5c88ba11b08aa7 (patch)
treecde63eb24102dddcd6334db1c5d43eb9ca531b1c /meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
parent5178615b4356c0043309b3f9e37d16396451a67b (diff)
downloadmeta-openembedded-01d3f9daa0c320070269e9a27a5c88ba11b08aa7.tar.gz
syslog-ng: upgrade 3.24.1 -> 3.31.2
License-Update: Reword and clarify which subdir is LGPLv.1 and GPLv2. Patch-Removal: * 0001-syslog-ng-fix-segment-fault-during-service-start.patch https://github.com/buytenh/ivykis/commit/a5e9caddbdb4d9d85133a440edec6aa7c1f018ac Submit pending patches upstream. Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch')
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch b/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
deleted file mode 100644
index b5bfcd025a..0000000000
--- a/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1Subject: [PATCH] syslog-ng: fix segment fault during service start on arm64
2
3service start failed since segment fault on arch arm64,
4syslog-ng have a submodule ivykis, from ivykis V0.42,
5it use pthread_atfork, but for arm64, this symbol is
6not included by libpthread, so cause segment fault.
7
8refer systemd, replace pthread_atfork with __register_atfork
9to fix this problem.
10
11I have create an issue, and this proposal to upstream.
12https://github.com/buytenh/ivykis/issues/15
13
14Upstream-Status: Pending
15
16Signed-off-by: Changqing Li <changqing.li@windriver.com>
17
18Update for 3.24.1.
19Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
20---
21 lib/ivykis/src/pthr.h | 23 ++++++++++++-----------
22 1 file changed, 12 insertions(+), 11 deletions(-)
23
24diff --git a/lib/ivykis/src/pthr.h b/lib/ivykis/src/pthr.h
25index 29e4be7..5d29096 100644
26--- a/lib/ivykis/src/pthr.h
27+++ b/lib/ivykis/src/pthr.h
28@@ -24,6 +24,16 @@
29 #include <pthread.h>
30 #include <signal.h>
31
32+#ifdef __GLIBC__
33+/* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
34+ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
35+ * libpthread, as it is part of glibc anyway. */
36+extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
37+extern void* __dso_handle __attribute__ ((__weak__));
38+#else
39+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
40+#endif
41+
42 #ifdef HAVE_PRAGMA_WEAK
43 #pragma weak pthread_create
44 #endif
45@@ -36,16 +46,7 @@ static inline int pthreads_available(void)
46
47 #ifdef HAVE_PRAGMA_WEAK
48
49-/*
50- * On Linux, pthread_atfork() is defined in libc_nonshared.a (for
51- * glibc >= 2.28) or libpthread_nonshared.a (for glibc <= 2.27), and
52- * we want to avoid "#pragma weak" for that symbol because that causes
53- * it to be undefined even if you link lib*_nonshared.a in explicitly.
54- */
55-#if !defined(HAVE_LIBC_NONSHARED) && !defined(HAVE_LIBPTHREAD_NONSHARED)
56-#pragma weak pthread_atfork
57-#endif
58-
59+#pragma weak __register_atfork
60 #pragma weak pthread_create
61 #pragma weak pthread_detach
62 #pragma weak pthread_getspecific
63@@ -73,7 +74,7 @@ static inline int
64 pthr_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
65 {
66 if (pthreads_available())
67- return pthread_atfork(prepare, parent, child);
68+ return __register_atfork(prepare, parent, child, __dso_handle);
69
70 return ENOSYS;
71 }
72--
732.7.4
74