Skip to content

Conversation

@MarcelRaad
Copy link
Member

MSVC warns that gethostbyname is deprecated. Always use getaddrinfo
instead to fix this when IPv6 is enabled, also for IPv4 resolves. This
is also consistent with what libcurl does.

I get the same test results on Ubuntu as before this change.

Required to change the MSVC warning level from 3 to 4 in the CMake build as proposed by @bagder in #1667 (comment).

MSVC warns that gethostbyname is deprecated. Always use getaddrinfo
instead to fix this when IPv6 is enabled, also for IPv4 resolves. This
is also consistent with what libcurl does.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 75.317% when pulling 0d357b2 on MarcelRaad:resolve_gethostbyname into 798ad5d on curl:master.

he = gethostbyname(host);

rc = !he;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you tested was ipv6 disabled? it looks like you're missing a brace here, otherwise it looks fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks! It was enabled, It thought that was the more interesting case.

@MarcelRaad MarcelRaad deleted the resolve_gethostbyname branch July 18, 2017 16:26
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants