mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 16:22:47 +01:00
fix issue with windows getnameinfo()
This commit is contained in:
parent
ad4e5c15fb
commit
d31156931d
1 changed files with 1 additions and 1 deletions
2
externals/httplib/httplib.h
vendored
2
externals/httplib/httplib.h
vendored
|
@ -1545,7 +1545,7 @@ inline std::string get_remote_addr(socket_t sock) {
|
||||||
std::array<char, NI_MAXHOST> ipstr{};
|
std::array<char, NI_MAXHOST> ipstr{};
|
||||||
|
|
||||||
if (!getnameinfo(reinterpret_cast<struct sockaddr *>(&addr), len,
|
if (!getnameinfo(reinterpret_cast<struct sockaddr *>(&addr), len,
|
||||||
ipstr.data(), ipstr.size(), nullptr, 0, NI_NUMERICHOST)) {
|
ipstr.data(), static_cast<unsigned int>(ipstr.size()), nullptr, 0, NI_NUMERICHOST)) {
|
||||||
return ipstr.data();
|
return ipstr.data();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue