summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2018-09-14 08:08:59 -0700
committerGitHub <noreply@github.com>2018-09-14 08:08:59 -0700
commitaf61ee6f3a35f8cdbb174676e2fe7efdaf9db11c (patch)
tree86f177cc4a6bcb192857fcdf063e05b3366a90ef /include
parent04d7a1df96cff63e985c5f8c683ed72696db40ad (diff)
parent88abd6ffc61b76fc244b9f7e885d6d9d64cb506e (diff)
downloadinfinitytier-af61ee6f3a35f8cdbb174676e2fe7efdaf9db11c.tar.gz
infinitytier-af61ee6f3a35f8cdbb174676e2fe7efdaf9db11c.zip
Merge pull request #836 from skunkwerks/feature/add-freebsd-debugs
add support for debug flags in FreeBSD
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierDebug.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ZeroTierDebug.h b/include/ZeroTierDebug.h
index a60179b7..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
@@ -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