소스 검색

programs: fix includes for Windows

Jean-Baptiste Kempf 9 년 전
부모
커밋
ee8b12691e
2개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 5 3
      bin/discover.c
  2. 5 3
      bin/inverse.c

+ 5 - 3
bin/discover.c

@@ -33,9 +33,11 @@
 #include <string.h>
 #include <assert.h>
 
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#if !defined( _WIN32 )
+# include <arpa/inet.h>
+#else
+# include <winsock2.h>
+#endif
 
 #include "bdsm.h"
 

+ 5 - 3
bin/inverse.c

@@ -33,9 +33,11 @@
 #include <string.h>
 #include <assert.h>
 
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#if !defined( _WIN32 )
+# include <arpa/inet.h>
+#else
+# include <winsock2.h>
+#endif
 
 #include "bdsm.h"