소스 검색

Conditional include of socket.h or winsock2 in tests (closes #169)

Thanks to MarjanTomas.
Stéphane Raimbault 11 년 전
부모
커밋
946fb25cdd
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tests/unit-test-server.c

+ 5 - 1
tests/unit-test-server.c

@@ -21,7 +21,11 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <modbus.h>
-#include <sys/socket.h>
+#ifdef _WIN32
+# include <winsock2.h>
+#else
+# include <sys/socket.h>
+#endif
 
 #include "unit-test.h"