]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pkcs11: Fix build on Windows
authorMichał Skalski <mskalski@enigma.com.pl>
Sun, 24 Jan 2021 20:14:57 +0000 (21:14 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 25 Jan 2021 14:16:12 +0000 (15:16 +0100)
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

index 119126fedd97ec65856a04b9c6d0ba9b71aa5f82..6c0dda3fa11fa44a243d5a435aca0918cf4c58ef 100644 (file)
 
 #include "pkcs11_library.h"
 
+#ifndef WIN32
 #include <dlfcn.h>
+#else
+/* macro defined by synchapi.h that maps to CreateMutexA/W */
+#undef CreateMutex
+#endif
 
 #include <library.h>
 #include <asn1/asn1.h>