Adam Ierymenko 6 years ago
parent
commit
8057c826bc
3 changed files with 18 additions and 2 deletions
  1. 6 0
      osdep/LinuxNetLink.cpp
  2. 6 1
      osdep/WindowsEthernetTap.cpp
  3. 6 1
      osdep/WindowsEthernetTap.hpp

+ 6 - 0
osdep/LinuxNetLink.cpp

@@ -11,6 +11,10 @@
  */
 /****/
 
+#include "../node/Constants.hpp"
+
+#ifdef __LINUX__
+
 #include "LinuxNetLink.hpp"
 
 #include <unistd.h>
@@ -1066,3 +1070,5 @@ int LinuxNetLink::_indexForInterface(const char *iface)
 }
 
 } // namespace ZeroTier
+
+#endif

+ 6 - 1
osdep/WindowsEthernetTap.cpp

@@ -11,6 +11,10 @@
  */
 /****/
 
+#include "../node/Constants.hpp"
+
+#ifdef __WINDOWS__
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -36,7 +40,6 @@
 #include <iostream>
 #include <set>
 
-#include "../node/Constants.hpp"
 #include "../node/Utils.hpp"
 #include "../node/Mutex.hpp"
 
@@ -1291,3 +1294,5 @@ void WindowsEthernetTap::_syncIps()
 }
 
 } // namespace ZeroTier
+
+#endif

+ 6 - 1
osdep/WindowsEthernetTap.hpp

@@ -14,6 +14,10 @@
 #ifndef ZT_WINDOWSETHERNETTAP_HPP
 #define ZT_WINDOWSETHERNETTAP_HPP
 
+#include "../node/Constants.hpp"
+
+#ifdef __WINDOWS__
+
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -23,7 +27,6 @@
 #include <queue>
 #include <stdexcept>
 
-#include "../node/Constants.hpp"
 #include "../node/Mutex.hpp"
 #include "../node/MulticastGroup.hpp"
 #include "../node/InetAddress.hpp"
@@ -155,3 +158,5 @@ private:
 } // namespace ZeroTier
 
 #endif
+
+#endif