From b3bb62881a8b0bfc42bce0501ff55cd6dfe07d96 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Thu, 6 Oct 2022 01:27:27 +0200 Subject: [PATCH] Disable poll support for MSVC 2010 and earlier --- libretro-common/include/net/net_compat.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libretro-common/include/net/net_compat.h b/libretro-common/include/net/net_compat.h index 8fbe18620e..3408b47672 100644 --- a/libretro-common/include/net/net_compat.h +++ b/libretro-common/include/net/net_compat.h @@ -43,7 +43,16 @@ #include #include -#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 +#if _MSC_VER && _MSC_VER <= 1600 +/* If we are using MSVC2010 or lower, disable WSAPoll support + * to ensure Windows XP and earlier backwards compatibility */ +#else +#ifndef WIN32_SUPPORTS_POLL +#define WIN32_SUPPORTS_POLL 1 +#endif +#endif + +#if defined(WIN32_SUPPORTS_POLL) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 #define NETWORK_HAVE_POLL 1 #endif