Fix the windows binding for getaddrinfo

getaddrinfo should take a double pointer to ADDRINFOA instead of a single pointer. If you call the binding in its current state you will not get back a valid ADDRINFOA struct.

I have also changed the `node` and `service` params to be cstring to avoid having to do `transmute(u8) value`.
This commit is contained in:
Carwyn Nelson
2021-11-10 15:15:40 +00:00
committed by GitHub
parent 989ddbd688
commit d8b1523161

View File

@@ -76,10 +76,10 @@ foreign ws2_32 {
listen :: proc(socket: SOCKET, backlog: c_int) -> c_int ---
connect :: proc(socket: SOCKET, address: ^SOCKADDR, len: c_int) -> c_int ---
getaddrinfo :: proc(
node: ^c_char,
service: ^c_char,
node: cstring,
service: cstring,
hints: ^ADDRINFOA,
res: ^ADDRINFOA,
res: ^^ADDRINFOA,
) -> c_int ---
freeaddrinfo :: proc(res: ^ADDRINFOA) ---
select :: proc(