head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.06.07.18.03.46; author adam; state Exp; branches; next ; commitid IVPPwNKbuws8uTIG; desc @@ 1.1 log @curl/libcurl-gnutls: fix build with nettle 4.0; support Darwin @ text @$NetBSD$ Allow building with nettle 4.0 https://github.com/curl/curl/pull/21169 --- lib/sha256.c.orig 2026-04-29 05:45:57.000000000 +0000 +++ lib/sha256.c @@@@ -113,7 +113,8 @@@@ static void my_sha256_final(unsigned cha } #elif defined(USE_GNUTLS) -#include +#include +#include typedef struct sha256_ctx my_sha256_ctx; @@@@ -132,7 +133,11 @@@@ static void my_sha256_update(void *ctx, static void my_sha256_final(unsigned char *digest, void *ctx) { +#if NETTLE_VERSION_MAJOR >= 4 + sha256_digest(ctx, digest); +#else sha256_digest(ctx, SHA256_DIGEST_SIZE, digest); +#endif } #elif defined(USE_MBEDTLS) && \ @