]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: link `-lcrypt32` instead of `-lm` for wolfSSL on Windows
authorViktor Szakats <commit@vsz.me>
Thu, 2 Jul 2026 22:18:35 +0000 (00:18 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 2 Jul 2026 23:35:34 +0000 (01:35 +0200)
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

index a18659605e770f966aee14e424451c3594e49c95..29ae6b0c6cfdc845e7d5270b72559a5a59e8b80b 100644 (file)
@@ -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