Parcourir la source

Include winsock2.h before ws2tcpip.h for VS 2005

Thanks to Petr Gladkiy
Stéphane Raimbault il y a 12 ans
Parent
commit
3b4d8126f1
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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