]> sigrok.org Git - libsigrok.git/commitdiff
Winsock2.h must be included before anything that includes Winsock.h.
authorMartin Ling <redacted>
Sun, 22 Dec 2013 14:50:11 +0000 (14:50 +0000)
committerMartin Ling <redacted>
Sun, 22 Dec 2013 14:59:43 +0000 (14:59 +0000)
hardware/common/scpi_tcp.c

index 8f4ea21dcdac8a844547c89dc6f68121e9d95b29..e457287181868573290e2c9549b9c7a4b1727d37 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifdef _WIN32
 #define _WIN32_WINNT 0x0501
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
 
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 #include <glib.h>
 #include <string.h>
 #include <unistd.h>
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
+#ifndef _WIN32
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>