From 0fff69d514aea3879cd8dabb767c571527d6b60b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 3 Jul 2026 00:18:35 +0200 Subject: [PATCH] configure: link `-lcrypt32` instead of `-lm` for wolfSSL on Windows Syncing it with CMake/FindWolfSSL. `-lm` is not needed on Windows. As of mingw-w64 14.0.0 it's offered as a dummy library; in such case it wasn't causing an actual issue. `-lcryp32` is necessary when linking wolfSSL statically. Ref: #22249 Closes #22251 --- m4/curl-wolfssl.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m4/curl-wolfssl.m4 b/m4/curl-wolfssl.m4 index a18659605e..29ae6b0c6c 100644 --- a/m4/curl-wolfssl.m4 +++ b/m4/curl-wolfssl.m4 @@ -76,6 +76,8 @@ if test "$OPT_WOLFSSL" != "no"; then if test "$curl_cv_apple" = "yes"; then addlib="$addlib -framework Security -framework CoreFoundation" + elif test "$curl_cv_native_windows" = "yes"; then + addlib="$addlib -lcrypt32" else addlib="$addlib -lm" fi