Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msvc: fix building with HAVE_INET_NTOP and MSVC <=1900 #15923

Closed
wants to merge 12 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jan 7, 2025

MSVC 1900 and older is missing a const specifier in the inet_ntop()
declaration for the second argument. A workaround was in place for it
in cmake, but it didn't cover all necessary versions.

Replace the workaround with a different one, move it to lib/inet_ntop.c
and extend to all necessary MSVC versions.

Also add CI jobs for the older MSVC versions: 2013, 2015, 2017.

```
lib/hostip.c(144): error C2220: warning treated as error - no 'object' file generated
lib/hostip.c(144): warning C4090: 'function': different 'const' qualifiers
lib/hostip.c(151): warning C4090: 'function': different 'const' qualifiers
```
https://ci.appveyor.com/project/curlorg/curl/builds/51277632/job/r41upsidsavaxvl2#L179
@github-actions github-actions bot added the CI Continuous Integration label Jan 7, 2025
@vszakats vszakats changed the title msvc: fix building with HAVE_INET_NTOP with MSVC msvc: fix building with HAVE_INET_NTOP and MSVC <=1900 Jan 7, 2025
@vszakats vszakats added build Windows Windows-specific labels Jan 7, 2025
@vszakats vszakats closed this in 08ff33e Jan 7, 2025
@vszakats vszakats deleted the msvc-inet-ntop branch January 7, 2025 13:08
vszakats added a commit to vszakats/curl that referenced this pull request Jan 7, 2025
vszakats added a commit that referenced this pull request Jan 7, 2025
Also to align with existing VS2010. Keeping the VS2008 job first to give
a quick sniff test for MSVC builds.

Follow-up to 08ff33e #15923
Follow-up to 50f6a6b #15926

Closes #15932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

1 participant