mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
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:
@@ -76,10 +76,10 @@ foreign ws2_32 {
|
|||||||
listen :: proc(socket: SOCKET, backlog: c_int) -> c_int ---
|
listen :: proc(socket: SOCKET, backlog: c_int) -> c_int ---
|
||||||
connect :: proc(socket: SOCKET, address: ^SOCKADDR, len: c_int) -> c_int ---
|
connect :: proc(socket: SOCKET, address: ^SOCKADDR, len: c_int) -> c_int ---
|
||||||
getaddrinfo :: proc(
|
getaddrinfo :: proc(
|
||||||
node: ^c_char,
|
node: cstring,
|
||||||
service: ^c_char,
|
service: cstring,
|
||||||
hints: ^ADDRINFOA,
|
hints: ^ADDRINFOA,
|
||||||
res: ^ADDRINFOA,
|
res: ^^ADDRINFOA,
|
||||||
) -> c_int ---
|
) -> c_int ---
|
||||||
freeaddrinfo :: proc(res: ^ADDRINFOA) ---
|
freeaddrinfo :: proc(res: ^ADDRINFOA) ---
|
||||||
select :: proc(
|
select :: proc(
|
||||||
|
|||||||
Reference in New Issue
Block a user