From: Martin Ling Date: Sun, 22 Dec 2013 14:50:11 +0000 (+0000) Subject: Winsock2.h must be included before anything that includes Winsock.h. X-Git-Tag: libsigrok-0.3.0~419 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=589edd9b81bce493de73075c9cdd6a5928ed3f59;p=libsigrok.git Winsock2.h must be included before anything that includes Winsock.h. --- diff --git a/hardware/common/scpi_tcp.c b/hardware/common/scpi_tcp.c index 8f4ea21d..e4572871 100644 --- a/hardware/common/scpi_tcp.c +++ b/hardware/common/scpi_tcp.c @@ -17,7 +17,11 @@ * along with this program. If not, see . */ +#ifdef _WIN32 #define _WIN32_WINNT 0x0501 +#include +#include +#endif #include "libsigrok.h" #include "libsigrok-internal.h" @@ -25,10 +29,7 @@ #include #include #include -#ifdef _WIN32 -#include -#include -#else +#ifndef _WIN32 #include #include #include