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

tests/server/resolve.c: fix deprecation warning #1682

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@MarcelRaad
Copy link
Member

MarcelRaad commented Jul 17, 2017

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).

tests/server/resolve.c: fix deprecation warning
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

This comment has been minimized.

Copy link

coveralls commented Jul 17, 2017

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

This comment has been minimized.

@jay

jay Jul 18, 2017

Member

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

This comment has been minimized.

@MarcelRaad

MarcelRaad Jul 18, 2017

Author Member

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

@MarcelRaad MarcelRaad deleted the MarcelRaad:resolve_gethostbyname branch Jul 18, 2017

@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.
You can’t perform that action at this time.