Skip to content

Commit 18ffd48

Browse files
committed
std.c: Support optional addr and host arguments in getnameinfo
The POSIX spec allows passing null here https://pubs.opengroup.org/onlinepubs/9799919799/functions/getnameinfo.html
1 parent 933ba93 commit 18ffd48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/c.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9770,9 +9770,9 @@ pub extern "c" fn freeaddrinfo(res: *addrinfo) void;
97709770
pub extern "c" fn getnameinfo(
97719771
noalias addr: *const sockaddr,
97729772
addrlen: socklen_t,
9773-
noalias host: [*]u8,
9773+
noalias host: ?[*]u8,
97749774
hostlen: socklen_t,
9775-
noalias serv: [*]u8,
9775+
noalias serv: ?[*]u8,
97769776
servlen: socklen_t,
97779777
flags: u32,
97789778
) EAI;

0 commit comments

Comments
 (0)