aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch')
-rw-r--r--meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch
new file mode 100644
index 0000000000..c3f2574d26
--- /dev/null
+++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0006-monkey-Fix-TLS-detection-testcase.patch
@@ -0,0 +1,36 @@
+From f88d9b82e8bd8ae38fba666b5825ffb41769f81a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 9 Aug 2022 12:25:22 -0700
+Subject: [PATCH] monkey: Fix TLS detection testcase
+
+Clang15 errors out on compiling the check and disables TLS
+
+Fixes errors like
+
+error: call to undeclared function '__tls_get_addr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ __tls_get_addr(0);
+ ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/monkey/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt
+index 15e62e8..96ac2bd 100644
+--- a/lib/monkey/CMakeLists.txt
++++ b/lib/monkey/CMakeLists.txt
+@@ -178,6 +178,8 @@ endif()
+ # Use old Pthread TLS
+ if(NOT MK_PTHREAD_TLS)
+ check_c_source_compiles("
++ #include <sys/types.h>
++ extern void *__tls_get_addr(size_t *v);
+ __thread int a;
+ int main() {
+ __tls_get_addr(0);
+--
+2.37.1
+