This commit is contained in:
yhirose 2019-07-03 10:51:52 -04:00
parent 30d73051ee
commit 74e9a0d17e

View file

@ -646,8 +646,8 @@ socket_t create_socket(const char *host, int port, Fn fn,
for (auto rp = result; rp; rp = rp->ai_next) {
// Create a socket
#ifdef _WIN32
auto sock = WSASocket(rp->ai_family, rp->ai_socktype, rp->ai_protocol,
nullptr, 0, WSA_FLAG_NO_HANDLE_INHERIT);
auto sock = WSASocketW(rp->ai_family, rp->ai_socktype, rp->ai_protocol,
nullptr, 0, WSA_FLAG_NO_HANDLE_INHERIT);
#else
auto sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
#endif