]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sha256: fix symbol collision between nettle (GnuTLS) and OpenSSL codepath
authorViktor Szakats <commit@vsz.me>
Sun, 11 Aug 2024 19:43:46 +0000 (21:43 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 13 Aug 2024 07:28:27 +0000 (09:28 +0200)
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

lib/sha256.c

index 6ff66f74184a34ac22b220aa8d55be048a5091f6..04bc432ffab5bd91781a1a5c0f8ac87286a48529 100644 (file)
 
 #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)
 {