aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/entropy/win32_stats/es_win32.cpp2
-rw-r--r--src/lib/rng/system_rng/system_rng.cpp1
-rw-r--r--src/lib/utils/dyn_load/dyn_load.cpp1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/entropy/win32_stats/es_win32.cpp b/src/lib/entropy/win32_stats/es_win32.cpp
index 520848615..0e7056550 100644
--- a/src/lib/entropy/win32_stats/es_win32.cpp
+++ b/src/lib/entropy/win32_stats/es_win32.cpp
@@ -6,7 +6,9 @@
*/
#include <botan/internal/es_win32.h>
+
#define NOMINMAX 1
+#define _WINSOCKAPI_ // stop windows.h including winsock.h
#include <windows.h>
#include <tlhelp32.h>
diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp
index cafdaac78..9ee306991 100644
--- a/src/lib/rng/system_rng/system_rng.cpp
+++ b/src/lib/rng/system_rng/system_rng.cpp
@@ -10,6 +10,7 @@
#if defined(BOTAN_TARGET_OS_HAS_CRYPTGENRANDOM)
#define NOMINMAX 1
+ #define _WINSOCKAPI_ // stop windows.h including winsock.h
#include <windows.h>
#include <wincrypt.h>
diff --git a/src/lib/utils/dyn_load/dyn_load.cpp b/src/lib/utils/dyn_load/dyn_load.cpp
index 1f33dc761..2b24e5f6c 100644
--- a/src/lib/utils/dyn_load/dyn_load.cpp
+++ b/src/lib/utils/dyn_load/dyn_load.cpp
@@ -13,6 +13,7 @@
#include <dlfcn.h>
#elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)
#define NOMINMAX 1
+ #define _WINSOCKAPI_ // stop windows.h including winsock.h
#include <windows.h>
#endif