winbuild: Fix manifest embedding for proper OS version querying #4399
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.
I believe this will fix #4391. I don't have nghttp built on this machine to test with, so I cannot be sure. I can verify that building without this fix results in no manifest in the exe, and there is a manifest after this change. Without a manifest the OS version checks in the SChannel code will not be correct, and libcurl will not attempt to use ALPN in the TLS handshake.
This fixes commit ebd2132 in pull request #1221. That commit added the CURL_EMBED_MANIFEST flag to CURL_RC_FLAGS (line 361). However, later in the file CURL_RC_FLAGS is overwritten. The fix is to append values to CURL_RC_FLAGS instead of overwriting.