-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch.txt
72 lines (66 loc) · 2.27 KB
/
patch.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 24b1d79..0758804 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,6 +89,7 @@ include_directories(${ZTO_SRC_DIR}/node)
include_directories(${ZTO_SRC_DIR}/osdep)
# ZeroTier (ext)
#include_directories(${ZTO_SRC_DIR}/ext/miniupnpc)
+include_directories(${ZTO_SRC_DIR}/ext) # for nlohmann/json.hpp
include_directories(${ZTO_SRC_DIR}/ext/libnatpmp)
include_directories(${ZTO_SRC_DIR}/ext/prometheus-cpp-lite-1.0/core/include)
include_directories(${ZTO_SRC_DIR}/ext/prometheus-cpp-lite-1.0/simpleapi/include)
@@ -168,7 +169,7 @@ endif()
if(BUILD_HOST)
set(BUILD_STATIC_LIB TRUE)
set(BUILD_SHARED_LIB TRUE)
- set(BUILD_HOST_EXAMPLES TRUE)
+ set(BUILD_HOST_EXAMPLES FALSE)
set(ALLOW_INSTALL_TARGET TRUE)
set(BUILD_HOST_SELFTEST FALSE)
set(ZTS_ENABLE_STATS TRUE)
diff --git a/include/ZeroTierSockets.h b/include/ZeroTierSockets.h
index ba9732a..1f456e8 100644
--- a/include/ZeroTierSockets.h
+++ b/include/ZeroTierSockets.h
@@ -197,7 +197,7 @@ typedef enum {
/**
* Error variable set after each `zts_*` socket call. Provides additional error context.
*/
-extern int zts_errno;
+// extern int zts_errno; // see line 1029
typedef enum {
/** Operation not permitted */
@@ -1011,22 +1011,28 @@ typedef struct {
//----------------------------------------------------------------------------//
#if defined(_WIN32)
-#ifdef ADD_EXPORTS
-#define ZTS_API __declspec(dllexport)
+ #ifndef ZTS_STATIC
+ #ifdef ADD_EXPORTS
+ #define ZTS_API __declspec(dllexport)
+ #else
+ #define ZTS_API __declspec(dllimport)
+ #endif
+ #else
+ #define ZTS_API
+ #endif
+ #define ZTCALL __cdecl
#else
-#define ZTS_API __declspec(dllimport)
-#endif
-#define ZTCALL __cdecl
-#else
-#define ZTS_API
-#define ZTCALL
+ #define ZTS_API
+ #define ZTCALL
#endif
+extern ZTS_API int zts_errno;
+
//----------------------------------------------------------------------------//
// Central API //
//----------------------------------------------------------------------------//
-#define ZTS_DISABLE_CENTRAL_API 1
+// #define ZTS_DISABLE_CENTRAL_API 1
#ifndef ZTS_DISABLE_CENTRAL_API