Browse Source

fix issue with windows getnameinfo()

Brian Clinkenbeard 6 năm trước cách đây
mục cha
commit
d31156931d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      externals/httplib/httplib.h

+ 1 - 1
externals/httplib/httplib.h

@@ -1545,7 +1545,7 @@ 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<unsigned int>(ipstr.size()), nullptr, 0, NI_NUMERICHOST)) {
       return ipstr.data();
     }
   }