diff --git a/include/ZeroTierSockets.h b/include/ZeroTierSockets.h index ba9732ae..5ac350f7 100644 --- a/include/ZeroTierSockets.h +++ b/include/ZeroTierSockets.h @@ -1011,17 +1011,22 @@ 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 + //----------------------------------------------------------------------------// // Central API // //----------------------------------------------------------------------------//