Commit 891c6ddd5f

Koakuma <koachan@protonmail.com>
2020-10-30 05:46:33
Select stat struct type based on whether we are linking with libc
1 parent 5125eb7
Changed files (1)
lib
std
os
bits
lib/std/os/bits/linux/sparc64.zig
@@ -559,7 +559,7 @@ pub const kernel_stat = extern struct {
 };
 
 /// Renamed to Stat to not conflict with the stat function.
-pub const Stat = kernel_stat;
+pub const Stat = if (std.builtin.link_libc) libc_stat else kernel_stat;
 
 pub const timespec = extern struct {
     tv_sec: isize,