From: Viktor Szakats Date: Sun, 11 Aug 2024 19:43:46 +0000 (+0200) Subject: sha256: fix symbol collision between nettle (GnuTLS) and OpenSSL codepath X-Git-Tag: curl-8_10_0~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28c12bc9be22727a2ad45de27ecbc76994a043f4;p=thirdparty%2Fcurl.git sha256: fix symbol collision between nettle (GnuTLS) and OpenSSL codepath Fixes: ``` C:\vcpkg\installed\x64-windows\include\nettle\sha2.h(75,8): error C2011: 'sha256_ctx': 'struct' type redefinition ``` Ref: https://github.com/curl/curl/actions/runs/10341162641/job/28622681573?pr=14484#step:10:30 Cherry-picked from #14495 Closes #14515 --- diff --git a/lib/sha256.c b/lib/sha256.c index 6ff66f7418..04bc432ffa 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -100,10 +100,10 @@ #if defined(USE_OPENSSL_SHA256) -struct sha256_ctx { +struct ossl_sha256_ctx { EVP_MD_CTX *openssl_ctx; }; -typedef struct sha256_ctx my_sha256_ctx; +typedef struct ossl_sha256_ctx my_sha256_ctx; static CURLcode my_sha256_init(my_sha256_ctx *ctx) {