mirror of https://github.com/F-Stack/f-stack.git
🐛 ai->ai_addr should be (struct sockaddr *)(ai+1)
This commit is contained in:
parent
f1e85c1896
commit
d151f2e185
|
@ -56,7 +56,7 @@ getaddrinfo(const char *hostname, const char *servername,
|
|||
|
||||
ai->ai_next = NULL;
|
||||
ai->ai_canonname = NULL;
|
||||
ai->ai_addr = (struct sockaddr *)ai+1;
|
||||
ai->ai_addr = (struct sockaddr *)(ai+1);
|
||||
|
||||
struct sockaddr_in *si = (struct sockaddr_in *)ai->ai_addr;
|
||||
si->sin_len = ai->ai_addrlen = sizeof(struct sockaddr);
|
||||
|
|
Loading…
Reference in New Issue