aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2024-05-15 16:21:12 +0200
committerfxlb <devel.fx.lebail@orange.fr>2024-05-16 18:29:09 +0000
commitbf6711b017b8022334c399540c5f93edbd725d87 (patch)
tree1eee190cc7c4e077227746ee0de9ca5ca0c1c56e
parent93a5e159ecd6de5cbd179e408620039a198c4b3c (diff)
downloadlibpcap-upstream-master.tar.gz
thread-local: Add a workaround for building with TinyCCupstream-master
Some libpcap calls will not be thread-safe. Print a warning.
-rw-r--r--thread-local.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/thread-local.h b/thread-local.h
index 61296e56..c9cbda2c 100644
--- a/thread-local.h
+++ b/thread-local.h
@@ -50,6 +50,9 @@
#ifndef thread_local
#if __STDC_VERSION__ >= 201112 && !defined __STDC_NO_THREADS__
#define thread_local _Thread_local
+ #elif defined __TINYC__
+ #define thread_local
+ #warning "Some libpcap calls will not be thread-safe."
#elif defined _WIN32 && ( \
defined _MSC_VER || \
defined __ICL || \