fix py ext windows build
diff --git a/lib/py/src/ext/endian.h b/lib/py/src/ext/endian.h
index 13c9b6b..8f9e978 100644
--- a/lib/py/src/ext/endian.h
+++ b/lib/py/src/ext/endian.h
@@ -22,13 +22,12 @@
 
 #include <Python.h>
 
-#ifndef _WIN32
-#include <netinet/in.h>
-#else
+#ifdef _WIN32
 #include <winsock2.h>
 #pragma comment(lib, "ws2_32.lib")
 #define inline __inline
-#endif
+#else
+#include <netinet/in.h>
 
 static inline unsigned long long ntohll(unsigned long long n) {
   union {
@@ -47,6 +46,8 @@
 
 #define htonll(n) ntohll(n)
 
+#endif // !_WIN32
+
 static inline unsigned long long letohll(unsigned long long n) {
   union {
     unsigned long long f;