Repository navigation
Conversation
After recent changes to crypto/hash use, openssl headers can be included
earlier than before, earlier than the conflict mitigation previously put
into `lib/vtls/openssl.h`. This broke some build configurations.
Move the conflict mitigation as up to the global headers as possible to
make it effective again, hopefully fixing this for good.
Seen in curl-for-win dev builds with OpenSSL in win-llvm:
```
In file included from curl-for-win/curl/_x64-win-ucrt-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_4_c.c:22:
In file included from curl-for-win/curl/lib/vauth/digest.c:36:
In file included from curl-for-win/curl/lib/curl_sha512_256.h:41:
In file included from curl-for-win/awslc/_x64-win-ucrt/usr/include/openssl/opensslv.h:7:
In file included from curl-for-win/awslc/_x64-win-ucrt/usr/include/openssl/crypto.h:7:
curl-for-win/awslc/_x64-win-ucrt/usr/include/openssl/base.h:335:29: error: expected ')'
335 | typedef struct X509_name_st X509_NAME;
| ^
curl-for-win/llvm-mingw/x86_64-w64-mingw32/include/wincrypt.h:1515:29: note: expanded from macro 'X509_NAME'
1515 | #define X509_NAME ((LPCSTR) 7)
| ^
```
Ref: https://github.com/curl/curl-for-win/actions/runs/44300799917/job/134789709975#step:3:5085
Follow-up to ff18b24 curl#23497
Follow-up to f0f0a7f curl#21136
vszakats
force-pushed
the
wincrypt-ossl-conflict-2026
branch
from
November 18, 2026 12:47
42e866e to
6bfb123
Compare
Member
Author
|
MSYS2 package bumps happened, and it looks a 3rd-party header is edit: it's zlib, doing some changes that broke the previous workaround, and PR → #24037 |
vszakats
added a commit
that referenced
this pull request
Nov 18, 2026
…ader zlib 1.3.1.2+ built with cmake sets `HAVE_UNISTD_H` to `1` in its public header when the zlib build environment detected `unistd.h`. This breaks dependents that rely on this macro, when the zlib-build-time value differs from the actual target build environment, as in curl CI, which uses the mingw-built package in an MSVC build. The issue surfaced when the MSYS2 package switched to using cmake while bumping from 1.3.2 to 1.4, and this propagated into the Windows runner, causing: ``` curl/lib/dict.c(58): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory ``` Ref: https://github.com/curl/curl/actions/runs/44311921832/job/134828014535?pr=24037#step:11:35 Refs: madler/zlib@3d6dc3c#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aR39-R41 msys2/MINGW-packages@5cbcc05 msys2/MINGW-packages#33269 Bug: #24036 (comment) Follow-up to c129d0b #17561 Closes #24037
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After recent changes to crypto/hash use, openssl headers can be included
earlier than before, earlier than the conflict mitigation previously put
into
lib/vtls/openssl.h. This broke some build configurations.Move the conflict mitigation as up to the global headers as possible to
make it effective again, hopefully fixing this for good.
Seen in curl-for-win dev builds with OpenSSL in win-llvm:
Ref: https://github.com/curl/curl-for-win/actions/runs/44300799917/job/134789709975#step:3:5085
Follow-up to ff18b24 #23497
Follow-up to f0f0a7f #21136