From 0a1306a817f6ae2a0475d62a968c1f52c892b885 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 15 Jul 2015 17:15:14 +0200 Subject: [PATCH] Fix windows.h being included before winsock.h --- ethminer/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ethminer/main.cpp b/ethminer/main.cpp index 4deba38d1..3022cfc76 100644 --- a/ethminer/main.cpp +++ b/ethminer/main.cpp @@ -20,6 +20,14 @@ * Ethereum client. */ +// Solves the problem of including windows.h before including winsock.h +// as detailed here: +// http://stackoverflow.com/questions/1372480/c-redefinition-header-files-winsock2-h +#if defined(_WIN32) +#define _WINSOCKAPI_ +#include +#endif + #include #include #include