| author | |
| committer | |
| log | 0618743543464e0b5862255ebb89f265bd29c8b9 |
| tree | f3bb7e93656e81daef510e15911d97e51e63727f |
| parent | 532047edd01ebedf6fae4d63ad25713f81d8fae4 |
glibc and musl define dev_t as u64, but in the kernel it is u32.
see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/types.h?id=v7.0#n172 files changed, 3 insertions(+), 3 deletions(-)
lib/std/c.zig+2-2| ... | ... | @@ -148,12 +148,12 @@ pub const timespec = switch (native_os) { |
| 148 | 148 | }; |
| 149 | 149 | |
| 150 | 150 | pub const dev_t = switch (native_os) { |
| 151 | .linux => linux.dev_t, | |
| 152 | 151 | .emscripten => emscripten.dev_t, |
| 153 | 152 | .wasi => wasi.device_t, |
| 154 | 153 | .openbsd, .haiku, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => i32, |
| 154 | // glibc and musl define dev_t as u64, while in Linux kernel it is u32. | |
| 155 | 155 | // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L43 |
| 156 | .netbsd, .freebsd, .serenity => u64, | |
| 156 | .linux, .netbsd, .freebsd, .serenity => u64, | |
| 157 | 157 | else => void, |
| 158 | 158 | }; |
| 159 | 159 |
lib/std/os/linux.zig+1-1| ... | ... | @@ -106,7 +106,7 @@ pub const user_desc = arch_bits.user_desc; |
| 106 | 106 | |
| 107 | 107 | pub const blkcnt_t = u64; |
| 108 | 108 | pub const blksize_t = u32; |
| 109 | pub const dev_t = u64; | |
| 109 | pub const dev_t = u32; | |
| 110 | 110 | pub const ino_t = u64; |
| 111 | 111 | pub const mode_t = u32; |
| 112 | 112 | pub const nlink_t = u32; |