From 9e76dbe054c3726833317b8c474bfed37367ee0e Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 27 Oct 2017 11:21:01 +0300 Subject: [PATCH] curl_setup: Improve detection of CURL_WINDOWS_APP If WINAPI_FAMILY is defined, it should be safe to try to include winapifamily.h to check what the define evaluates to. This should fix detection of CURL_WINDOWS_APP if building with _WIN32_WINNT set to 0x0600. Closes #2025 --- lib/curl_setup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 402ebc03d2..efd8281a45 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -751,7 +751,7 @@ endings either CRLF or LF so 't' is appropriate. /* Detect Windows App environment which has a restricted access * to the Win32 APIs. */ -# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602) +# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || defined(WINAPI_FAMILY) # include # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)