瀏覽代碼

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"