summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c')
-rw-r--r--fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c b/fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c
new file mode 100644
index 000000000..31681ae61
--- /dev/null
+++ b/fluent-bit/lib/librdkafka-2.1.0/packaging/cmake/try_compile/c11threads_test.c
@@ -0,0 +1,14 @@
+#include <threads.h>
+
+static int start_func(void *arg) {
+ int iarg = *(int *)arg;
+ return iarg;
+}
+
+void main(void) {
+ thrd_t thr;
+ int arg = 1;
+ if (thrd_create(&thr, start_func, (void *)&arg) != thrd_success) {
+ ;
+ }
+}