Commit 946fb25cdd1a125b5258b76a03b49c853d6a1a84

Authored by Stéphane Raimbault
1 parent 52a82f8c

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

Thanks to MarjanTomas.
Showing 1 changed file with 5 additions and 1 deletions
tests/unit-test-server.c
@@ -21,7 +21,11 @@ @@ -21,7 +21,11 @@
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <errno.h> 22 #include <errno.h>
23 #include <modbus.h> 23 #include <modbus.h>
24 -#include <sys/socket.h> 24 +#ifdef _WIN32
  25 +# include <winsock2.h>
  26 +#else
  27 +# include <sys/socket.h>
  28 +#endif
25 29
26 #include "unit-test.h" 30 #include "unit-test.h"
27 31