diff options
-rw-r--r-- | lib/libcrypto/hidden/crypto_namespace.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libcrypto/hidden/crypto_namespace.h b/lib/libcrypto/hidden/crypto_namespace.h index 5bf9b4d4da7..3aec62f1f14 100644 --- a/lib/libcrypto/hidden/crypto_namespace.h +++ b/lib/libcrypto/hidden/crypto_namespace.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */ /* * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> * @@ -25,14 +25,17 @@ */ #ifdef LIBRESSL_NAMESPACE -# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated)) #ifdef LIBRESSL_CRYPTO_NAMESPACE -# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ +# define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \ + __attribute__((visibility("hidden"))) \ + typeof(x) x asm("_lcry_"#x) +# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ typeof(x) x asm("_lcry_"#x) # define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x) # define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x) #else -# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x) +# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated)) +# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x) #endif #else # define LCRYPTO_UNUSED(x) |