From 6d65e9c393e99cc703dc61f6b2d75e5f359d9910 Mon Sep 17 00:00:00 2001 From: Sven Liedtke Date: Thu, 30 Mar 2023 09:21:30 +0200 Subject: [PATCH] Fix link issue in UWP builds without functional replacement --- contrib/unzip/crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/unzip/crypt.c b/contrib/unzip/crypt.c index 4cc731b3e..cc6650630 100644 --- a/contrib/unzip/crypt.c +++ b/contrib/unzip/crypt.c @@ -103,7 +103,7 @@ int cryptrand(unsigned char *buf, unsigned int len) unsigned __int64 pentium_tsc[1]; int result = 0; - + #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { result = CryptGenRandom(provider, len, buf); @@ -111,6 +111,7 @@ int cryptrand(unsigned char *buf, unsigned int len) if (result) return len; } + #endif for (rlen = 0; rlen < (int)len; ++rlen) {