Skip to content

Commit 2ccfb1d

Browse files
committed
std.c: Use std.c.NI as the flags type in getnameinfo
std.c.NI was never used in the source, so let's finally use it and make the function more clear! This is a breaking change, although a minor one: If you previously passed 0 here (meaning no flags), then now you have to pass an empty struct (.{}) instead. Otherwise, you probably used @bitcast() shenanigans here (like @bitcast(c.NI { .NUMERICHOST = true }) and that will still work, but you can also get rid of the @bitcast() now!
1 parent 18ffd48 commit 2ccfb1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/c.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9774,7 +9774,7 @@ pub extern "c" fn getnameinfo(
97749774
hostlen: socklen_t,
97759775
noalias serv: ?[*]u8,
97769776
servlen: socklen_t,
9777-
flags: u32,
9777+
flags: NI,
97789778
) EAI;
97799779

97809780
pub extern "c" fn gai_strerror(errcode: EAI) [*:0]const u8;

0 commit comments

Comments
 (0)