mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fixed compiler warning with Visual C++. Close #358
This commit is contained in:
parent
fce8e6fefd
commit
d0d744d520
1 changed files with 2 additions and 1 deletions
|
@ -1545,7 +1545,8 @@ inline std::string get_remote_addr(socket_t sock) {
|
|||
std::array<char, NI_MAXHOST> ipstr{};
|
||||
|
||||
if (!getnameinfo(reinterpret_cast<struct sockaddr *>(&addr), len,
|
||||
ipstr.data(), ipstr.size(), nullptr, 0, NI_NUMERICHOST)) {
|
||||
ipstr.data(), static_cast<socklen_t>(ipstr.size()),
|
||||
nullptr, 0, NI_NUMERICHOST)) {
|
||||
return ipstr.data();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue