From 67ab6a11877f6d1671da4afa6fbd142bf61a1ed2 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Wed, 23 Nov 2022 12:46:44 +0100 Subject: Neuter namespace differently to fix Appveyor CI --- Makefile.am.common | 3 +-- crypto/CMakeLists.txt | 1 - patches/opensslconf.h.patch | 24 ++++++++++++++++++++++++ patches/windows_headers.patch | 13 ------------- ssl/CMakeLists.txt | 2 -- 5 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 patches/opensslconf.h.patch diff --git a/Makefile.am.common b/Makefile.am.common index 2c641c5..87aa807 100644 --- a/Makefile.am.common +++ b/Makefile.am.common @@ -1,4 +1,3 @@ AM_CFLAGS = -AM_CPPFLAGS = -I$(top_srcdir)/crypto/hidden -I$(top_srcdir)/ssl/hidden -AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/include/compat -DLIBRESSL_INTERNAL +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat -DLIBRESSL_INTERNAL AM_CPPFLAGS += -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 1ed5405..8956884 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -999,7 +999,6 @@ target_include_directories(crypto_obj ecdh ecdsa evp - hidden hmac modes ocsp diff --git a/patches/opensslconf.h.patch b/patches/opensslconf.h.patch new file mode 100644 index 0000000..e060a20 --- /dev/null +++ b/patches/opensslconf.h.patch @@ -0,0 +1,24 @@ +--- include/openssl/opensslconf.h.orig Tue Nov 22 21:08:27 2022 ++++ include/openssl/opensslconf.h Wed Nov 23 12:38:07 2022 +@@ -1,6 +1,21 @@ + #include + /* crypto/opensslconf.h.in */ + ++#if defined(_MSC_VER) && !defined(__clang__) && !defined(__attribute__) ++#define __attribute__(a) ++#endif ++ ++#ifndef LIBRESSL_NAMESPACE ++# define LCRYPTO_UNUSED(x) ++# define LCRYPTO_USED(x) ++# define LCRYPTO_ALIAS1(pre, x) ++# define LCRYPTO_ALIAS(x) ++ ++# define LSSL_UNUSED(x) ++# define LSSL_USED(x) ++# define LSSL_ALIAS(x) ++#endif /* !LIBRESSL_NAMESPACE */ ++ + #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) + #define OPENSSLDIR "/etc/ssl" + #endif diff --git a/patches/windows_headers.patch b/patches/windows_headers.patch index 0e9428c..17c447d 100644 --- a/patches/windows_headers.patch +++ b/patches/windows_headers.patch @@ -13,19 +13,6 @@ diff -u include/openssl.orig/dtls1.h include/openssl/dtls1.h #include #include ---- include/openssl/opensslconf.h.orig Sat Nov 5 08:36:25 2016 -+++ include/openssl/opensslconf.h Mon Jul 17 06:06:58 2017 -@@ -1,6 +1,10 @@ - #include - /* crypto/opensslconf.h.in */ - -+#if defined(_MSC_VER) && !defined(__clang__) && !defined(__attribute__) -+#define __attribute__(a) -+#endif -+ - #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) - #define OPENSSLDIR "/etc/ssl" - #endif --- include/openssl/ossl_typ.h.orig Fri Feb 18 16:30:39 2022 +++ include/openssl/ossl_typ.h Mon Feb 21 05:39:35 2022 @@ -82,6 +82,22 @@ diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index 13072b1..4c7357a 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt @@ -64,9 +64,7 @@ set( add_library(ssl_obj OBJECT ${SSL_SRC}) target_include_directories(ssl_obj PRIVATE - ../crypto/hidden ../crypto/bio - ./hidden . ../include/compat PUBLIC -- cgit v1.2.3-55-g6feb