From 43cb91c947421c2dba6bc2f2104aa0b5aec80006 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 8 Nov 2023 02:09:32 +0000 Subject: amd64/bn_arch.h: avoid redefinition of `OPENSSL_NO_ASM` Fixes this warning when `OPENSSL_NO_ASM` is already set by the build system (seen with CMake): ``` In file included from ./libressl/crypto/bn/bn_mul.c:65: ./libressl/crypto/bn/arch/amd64/bn_arch.h:24:9: warning: 'OPENSSL_NO_ASM' macro redefined [-Wmacro-redefined] ^ :10:9: note: previous definition is here ^ ``` Reported in #910 --- patches/win32_amd64_bn_arch.h.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/win32_amd64_bn_arch.h.patch b/patches/win32_amd64_bn_arch.h.patch index 20205dc..ad7c89d 100644 --- a/patches/win32_amd64_bn_arch.h.patch +++ b/patches/win32_amd64_bn_arch.h.patch @@ -1,17 +1,19 @@ --- crypto/bn/arch/amd64/bn_arch.h.orig 2023-02-27 04:43:12.257874699 -0600 +++ crypto/bn/arch/amd64/bn_arch.h 2023-02-27 04:44:05.541873870 -0600 -@@ -20,6 +20,10 @@ +@@ -20,6 +20,12 @@ #ifndef HEADER_BN_ARCH_H #define HEADER_BN_ARCH_H +#ifdef _WIN32 ++#ifndef OPENSSL_NO_ASM +#define OPENSSL_NO_ASM ++#endif +#else + #ifndef OPENSSL_NO_ASM #define HAVE_BN_ADD -@@ -85,6 +89,7 @@ +@@ -85,6 +91,7 @@ *out_r0 = r0; } #endif /* __GNUC__ */ -- cgit v1.2.3-55-g6feb