summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/hidden/crypto_namespace.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libcrypto/hidden/crypto_namespace.h b/src/lib/libcrypto/hidden/crypto_namespace.h
index 5bf9b4d4da..3aec62f1f1 100644
--- a/src/lib/libcrypto/hidden/crypto_namespace.h
+++ b/src/lib/libcrypto/hidden/crypto_namespace.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */ 1/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> 3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
4 * 4 *
@@ -25,14 +25,17 @@
25 */ 25 */
26 26
27#ifdef LIBRESSL_NAMESPACE 27#ifdef LIBRESSL_NAMESPACE
28# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
29#ifdef LIBRESSL_CRYPTO_NAMESPACE 28#ifdef LIBRESSL_CRYPTO_NAMESPACE
30# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ 29# define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \
30 __attribute__((visibility("hidden"))) \
31 typeof(x) x asm("_lcry_"#x)
32# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
31 typeof(x) x asm("_lcry_"#x) 33 typeof(x) x asm("_lcry_"#x)
32# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x) 34# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x)
33# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x) 35# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x)
34#else 36#else
35# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x) 37# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
38# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
36#endif 39#endif
37#else 40#else
38# define LCRYPTO_UNUSED(x) 41# define LCRYPTO_UNUSED(x)