瀏覽代碼

Ifdef these to stop non-Windows IDEs from complaining.

Adam Ierymenko 6 年之前
父節點
當前提交
51ebefc3ab
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 4 0
      windows/ZeroTierOne/ZeroTierOneService.cpp
  2. 4 0
      windows/ZeroTierOne/ZeroTierOneService.h

+ 4 - 0
windows/ZeroTierOne/ZeroTierOneService.cpp

@@ -13,6 +13,8 @@
 
 #pragma region Includes
 
+#if defined(_WIN32) || defined(_WIN64)
+
 #include <WinSock2.h>
 #include <Windows.h>
 #include <stdio.h>
@@ -150,3 +152,5 @@ void ZeroTierOneService::OnShutdown()
 	// stop thread on system shutdown (if it hasn't happened already)
 	OnStop();
 }
+
+#endif

+ 4 - 0
windows/ZeroTierOne/ZeroTierOneService.h

@@ -13,6 +13,8 @@
 
 #pragma once
 
+#if defined(_WIN32) || defined(_WIN64)
+
 #include <stdio.h>
 
 #include "ServiceBase.h"
@@ -64,3 +66,5 @@ private:
 	ZeroTier::Mutex _lock;
 	ZeroTier::Thread _thread;
 };
+
+#endif