Fix build for MSVC
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
--- ssl/hidden/ssl_namespace.h.orig 2023-02-28 00:42:20.928756042 -0600
|
||||
+++ ssl/hidden/ssl_namespace.h 2023-02-28 00:43:16.372755180 -0600
|
||||
@@ -18,6 +18,10 @@
|
||||
#ifndef _LIBSSL_SSL_NAMESPACE_H_
|
||||
#define _LIBSSL_SSL_NAMESPACE_H_
|
||||
|
||||
+#if defined(_MSC_VER) && !defined(__clang__) && !defined(__attribute__)
|
||||
+#define __attribute__(a)
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* If marked as 'used', then internal calls use the name with prefix "_lssl_"
|
||||
--- openbsd/src/lib/libssl/hidden/ssl_namespace.h 2023-03-15 11:41:52.481641800 -0600
|
||||
+++ ssl/hidden/ssl_namespace.h 2023-03-15 17:28:04.685309300 -0600
|
||||
@@ -23,6 +23,11 @@
|
||||
* and we alias that to the normal name.
|
||||
*/
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#define LSSL_UNUSED(x)
|
||||
+#define LSSL_USED(x)
|
||||
+#define LSSL_ALIAS(x)
|
||||
+#else
|
||||
#ifdef LIBRESSL_NAMESPACE
|
||||
#define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated))
|
||||
#define LSSL_USED(x) __attribute__((visibility("hidden"))) \
|
||||
@@ -33,5 +38,6 @@
|
||||
#define LSSL_USED(x)
|
||||
#define LSSL_ALIAS(x) asm("")
|
||||
#endif
|
||||
+#endif /* _MSC_VER */
|
||||
|
||||
#endif /* _LIBSSL_SSL_NAMESPACE_H_ */
|
||||
|
Reference in New Issue
Block a user