From 6f19e5250d33169d2628d85c24b3434616ee1d69 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Sun, 1 Oct 2023 23:14:43 +0200 Subject: [PATCH] parser: weasel winsock2.h support This is a royal PITA to get compiled under various combinations of WIN32_LEAN_AND_MEAN and _WINSOCKAPI_ combinations. Signed-off-by: Simon Rozman --- include/stdex/parser.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/stdex/parser.hpp b/include/stdex/parser.hpp index 0b57e2643..b94b598dc 100644 --- a/include/stdex/parser.hpp +++ b/include/stdex/parser.hpp @@ -16,10 +16,11 @@ #include #include #if defined(_WIN32) -#ifndef _WINSOCKAPI_ #include +#if _MSC_VER >= 1300 #include #endif +#include #elif defined(__APPLE__) #include #else @@ -52,13 +53,12 @@ ENUM_FLAG_OPERATOR(T,^) \ ENUM_FLAG_OPERATOR(T,&) \ enum class T : type -#ifndef s6_words -#ifdef __APPLE__ +#if defined(_WIN32) +#elif defined(__APPLE__) #define s6_words __u6_addr.__u6_addr16 #else #error Unsupported platform #endif -#endif namespace stdex {