fixed UWP builds with RS4 SDK (#3348)

* fixed uwp builds with RS4 sdk

* fixed check for RS4

* [openssl] Revert line ending conversion
This commit is contained in:
Dale Stammen 2018-05-31 10:04:01 -07:00 committed by Robert Schumacher
parent 33ba066966
commit 8770a014ec
4 changed files with 34 additions and 2 deletions

View File

@ -1,3 +1,3 @@
Source: openssl
Version: 1.0.2o-2
Version: 1.0.2o-3
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.

View File

@ -0,0 +1,26 @@
diff --git a/ms/winrtdef.h b/ms/winrtdef.h
index b1a7598..6ba2e1d 100644
--- a/ms/winrtdef.h
+++ b/ms/winrtdef.h
@@ -6,9 +6,11 @@
#if defined(OPENSSL_WINAPP)
//Include stdio.h to replace fprintf
# include<stdio.h>
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN10_RS4)
# ifdef getenv
# undef getenv
# endif
+#endif
# ifdef setenv
# undef setenv
# endif
@@ -32,7 +34,9 @@
# undef GetModuleHandle
# define GetModuleHandle winrt_GetModuleHandle
# endif
+#if !defined(NTDDI_WIN10_RS4) || (NTDDI_VERSION < NTDDI_WIN10_RS4)
# define getenv winrt_getenv
+#endif
# define setenv winrt_getenv
int winrt_GetTickCount(void);

View File

@ -4,6 +4,8 @@ perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h
for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\
for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\
for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\
for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\
call ms\do_winuniversal.bat
@ -12,4 +14,3 @@ mkdir inc32\openssl
jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak
REM due to a race condition in the build, we need to have a second single-threaded pass.
nmake -f ms\ntdll.mak

View File

@ -43,6 +43,11 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-rs4.patch
)
file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)