aboutsummaryrefslogtreecommitdiff
path: root/patches/crypto_namespace.h.patch
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2025-08-18 12:52:28 +0200
committerTheo Buehler <tb@openbsd.org>2025-08-18 12:52:28 +0200
commitf30ace5a6bdae4a37b8a7475e420e6dcb9f5d344 (patch)
tree8611be9e8800584ffbe872fce95bd2b14d619c25 /patches/crypto_namespace.h.patch
parentb96c2ff27fbc8495f408104520fff36bb9f37e1b (diff)
parent8c76c282b3130f4967854686d3eaff0c15758d7c (diff)
downloadportable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.tar.gz
portable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.tar.bz2
portable-f30ace5a6bdae4a37b8a7475e420e6dcb9f5d344.zip
Land #1194 - Improve *_namespace.h patches
Diffstat (limited to 'patches/crypto_namespace.h.patch')
-rw-r--r--patches/crypto_namespace.h.patch23
1 files changed, 13 insertions, 10 deletions
diff --git a/patches/crypto_namespace.h.patch b/patches/crypto_namespace.h.patch
index 400030f..f45a121 100644
--- a/patches/crypto_namespace.h.patch
+++ b/patches/crypto_namespace.h.patch
@@ -1,22 +1,25 @@
1--- crypto/hidden/crypto_namespace.h.orig Fri Aug 2 23:52:55 2024 1--- crypto/hidden/crypto_namespace.h.orig Sun Aug 17 13:14:19 2025
2+++ crypto/hidden/crypto_namespace.h Fri Aug 2 23:53:17 2024 2+++ crypto/hidden/crypto_namespace.h Mon Aug 18 04:10:42 2025
3@@ -24,6 +24,12 @@ 3@@ -24,6 +24,10 @@
4 * external calls use the latter name. 4 * external calls use the latter name.
5 */ 5 */
6 6
7+#ifdef _MSC_VER 7+#ifdef _MSC_VER
8+# define LCRYPTO_UNUSED(x) 8+#undef LIBRESSL_NAMESPACE
9+# define LCRYPTO_USED(x) 9+#endif
10+# define LCRYPTO_ALIAS1(pre, x) 10+
11+# define LCRYPTO_ALIAS(x)
12+#else
13 #ifdef LIBRESSL_NAMESPACE 11 #ifdef LIBRESSL_NAMESPACE
14 #ifdef LIBRESSL_CRYPTO_NAMESPACE 12 #ifdef LIBRESSL_CRYPTO_NAMESPACE
15 # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \ 13 # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \
16@@ -47,5 +53,6 @@ 14@@ -45,7 +49,11 @@
15 # define LCRYPTO_UNUSED(x)
16 # define LCRYPTO_USED(x)
17 # define LCRYPTO_ALIAS1(pre,x) 17 # define LCRYPTO_ALIAS1(pre,x)
18+#ifdef _MSC_VER
19+# define LCRYPTO_ALIAS(x)
20+#else
18 # define LCRYPTO_ALIAS(x) asm("") 21 # define LCRYPTO_ALIAS(x) asm("")
19 #endif
20+#endif /* _MSC_VER */ 22+#endif /* _MSC_VER */
23 #endif
21 24
22 #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */ 25 #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */