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
src: fill sockaddr_in6.sin6_len when it's defined #2189
Conversation
As some calls in some platforms require.
Is this a problem IRL? In the example the check would succeed because sin6_family is set properly, wouldn't it? |
It returns |
And I've met this issue while trying to bring #964 up to date. |
Doh, sorry, I read that wrong... |
@@ -222,6 +222,9 @@ int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr) { | |||
memset(addr, 0, sizeof(*addr)); | |||
addr->sin6_family = AF_INET6; | |||
addr->sin6_port = htons(port); | |||
#ifdef SIN6_LEN | |||
addr->sin6_len = sizeof(struct sockaddr_in6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sizeof(*addr)
for consistency with other sizeof expressions?
As some calls in some platforms require. PR-URL: #2189 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in 98db184 incorporating Ben's suggestion. Thanks |
As some calls in some platforms require. PR-URL: libuv#2189 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
As some calls in some platforms require.
Example
CI: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/1231/