Explorar o código

Include winsock2.h before ws2tcpip.h for VS 2005

Thanks to Petr Gladkiy
Stéphane Raimbault %!s(int64=12) %!d(string=hai) anos
pai
achega
3b4d8126f1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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