summaryrefslogtreecommitdiff
path: root/include/ZeroTierDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ZeroTierDebug.h')
-rw-r--r--include/ZeroTierDebug.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ZeroTierDebug.h b/include/ZeroTierDebug.h
index 8e5366f0..5c3cd1bb 100644
--- a/include/ZeroTierDebug.h
+++ b/include/ZeroTierDebug.h
@@ -76,6 +76,9 @@
#ifdef __APPLE__
#define ZT_THREAD_ID (long)0 // (long)gettid()
#endif
+#ifdef __FreeBSD__
+ #define ZT_THREAD_ID (long)0 // (long)gettid()
+#endif
#ifdef _WIN32
#define ZT_THREAD_ID (long)0 //
#endif
@@ -86,7 +89,7 @@
#include <android/log.h>
#define ZT_LOG_TAG "ZTSDK"
#endif
-#if defined(ZT_TRACE)
+#if defined(ZT_DEBUG_TRACE)
#if ZT_MSG_INFO == true
#if defined(__ANDROID__)
#define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, ZT_LOG_TAG, \
@@ -96,7 +99,7 @@
#define DEBUG_INFO(fmt, ...) fprintf(stderr, ZT_GRN "INFO [%ld]: %17s:%5d:%25s: " fmt "\n" \
ZT_RESET, ZT_THREAD_ID, ZT_FILENAME, __LINE__, __FUNCTION__, __VA_ARGS__)
#endif
- #if defined(__linux__) or defined(__APPLE__)
+ #if defined(__linux__) or defined(__APPLE__) or defined(__FreeBSD__)
#define DEBUG_INFO(fmt, args ...) fprintf(stderr, ZT_GRN "INFO [%ld]: %17s:%5d:%25s: " fmt "\n" \
ZT_RESET, ZT_THREAD_ID, ZT_FILENAME, __LINE__, __FUNCTION__, ##args)
#endif