From: Charles Milette Date: Sat, 14 May 2022 01:42:29 +0000 (-0400) Subject: Fix UWP builds by defining VirtualLock X-Git-Tag: openssl-3.2.0-alpha1~2334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff1efe6e261598c3f71727b796767a8e716bcbe2;p=thirdparty%2Fopenssl.git Fix UWP builds by defining VirtualLock Reviewed-by: Tomas Mraz Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/18311) --- diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c index 53acd22c04b..60559a930ed 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -23,6 +23,20 @@ #ifndef OPENSSL_NO_SECURE_MEMORY # if defined(_WIN32) # include +# if defined(WINAPI_FAMILY_PARTITION) \ + && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) +/* + * While VirtualLock is available under the app partition (e.g. UWP), + * the headers do not define the API. Define it ourselves instead. + */ +WINBASEAPI +BOOL +WINAPI +VirtualLock( + _In_ LPVOID lpAddress, + _In_ SIZE_T dwSize + ); +# endif # endif # include # include