Explorar el Código

Use IPPROTO_IP

yhirose hace 1 año
padre
commit
4854a694cd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -3262,7 +3262,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
 
   memset(&hints, 0, sizeof(struct addrinfo));
   hints.ai_socktype = SOCK_STREAM;
-  hints.ai_protocol = 0;
+  hints.ai_protocol = IPPROTO_IP;
 
   if (!ip.empty()) {
     node = ip.c_str();