Browse Source

Include winsock2.h before ws2tcpip.h for VS 2005

Thanks to Petr Gladkiy
Stéphane Raimbault 12 years ago
parent
commit
3b4d8126f1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modbus-tcp.c

+ 2 - 0
src/modbus-tcp.c

@@ -33,6 +33,8 @@
 # ifndef WINVER
 # define WINVER 0x0501
 # endif
+/* Already set in modbus-tcp.h but it seems order matters in VS2005 */
+# include <winsock2.h>
 # include <ws2tcpip.h>
 # define SHUT_RDWR 2
 # define close closesocket