]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Define WINAPI_PARTITION_SYSTEM for older Windows headers
authorMilan Broz <gmazyland@gmail.com>
Wed, 22 Apr 2026 13:09:05 +0000 (15:09 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Thu, 30 Apr 2026 11:41:56 +0000 (13:41 +0200)
Some older Windows and MING64 environments does not have
WINAPI_PARTITION_SYSTEM defined.

This breaks build with strict warnings.

Add empty definition if this happens.

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Apr 30 11:42:23 2026
(Merged from https://github.com/openssl/openssl/pull/30941)

crypto/mem_sec.c

index 330c726f2c04593a59947e0e58aff6022181cf34..3c5de4de8f27515c6d60f62d9b7d3abc7b3794fe 100644 (file)
@@ -25,6 +25,9 @@
 #if defined(_WIN32)
 #include <windows.h>
 #if defined(WINAPI_FAMILY_PARTITION)
+#if !defined(WINAPI_PARTITION_SYSTEM)
+#define WINAPI_PARTITION_SYSTEM 0
+#endif
 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
 /*
  * While VirtualLock is available under the app partition (e.g. UWP),