From f30187d422ae062d311f7b9c12de867c3ca8fe22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Skalski?= Date: Sun, 24 Jan 2021 21:14:57 +0100 Subject: [PATCH] pkcs11: Fix build on Windows Windows provides CreateMutexA/W with an alias called CreateMutex that selects one of the other two based on the UNICODE constant. --- src/libstrongswan/plugins/pkcs11/pkcs11_library.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_library.c b/src/libstrongswan/plugins/pkcs11/pkcs11_library.c index 119126fed..6c0dda3fa 100644 --- a/src/libstrongswan/plugins/pkcs11/pkcs11_library.c +++ b/src/libstrongswan/plugins/pkcs11/pkcs11_library.c @@ -18,7 +18,12 @@ #include "pkcs11_library.h" +#ifndef WIN32 #include +#else +/* macro defined by synchapi.h that maps to CreateMutexA/W */ +#undef CreateMutex +#endif #include #include