win: cast setsockopt struct to const char*

Fixes: https://github.com/libuv/libuv/issues/2519
PR-URL: https://github.com/libuv/libuv/pull/2520
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Shelley Vohr 2019-10-16 09:13:24 -07:00 committed by cjihrig
parent ddcaff9a10
commit 68818b621a
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -556,7 +556,7 @@ int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb) {
if (handle->flags & UV_HANDLE_SHUTTING)
return UV_EINVAL;
if (0 != setsockopt(handle->socket, SOL_SOCKET, SO_LINGER, &l, sizeof(l)))
if (0 != setsockopt(handle->socket, SOL_SOCKET, SO_LINGER, (const char*)&l, sizeof(l)))
return uv_translate_sys_error(WSAGetLastError());
uv_close((uv_handle_t*) handle, close_cb);