zig-network
zig-network copied to clipboard
Code path issue when compiling for Linux while linking libc
When linking in libc I've noticed that compiling for Linux will result in a compilation error:
❯ zig build -Dtarget=native-linux
.\zig-network\network.zig:895:39: error: container 'std.c' has no member called 'getpeername'
switch (std.os.errno(std.os.system.getpeername(sockfd, addr, addrlen))) {
I've made a repro repository here:
https://github.com/GoNZooo/link-libc-network-repro
Removing exe.linkLibC() in build.zig results in a successful compilation.
Note
This is with the following zig version info:
❯ zig version
0.6.0+083c0f1ce