authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-03 21:54:22 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-03 21:54:22 -07:00
loga0c63c94f86f919e0b7ce09c54c609db1fcba99c
tree6bc14715f5964f7601357659fd92c806b2f99789
parent3f07f214aac54bcf8f84975a2312cd91ac67fa04
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.16.0


2 files changed, 30 insertions(+), 7 deletions(-)

README.md+1-1
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3![loc](https://sloc.xyz/github/nektro/zig-sys-linux)3![loc](https://sloc.xyz/github/nektro/zig-sys-linux)
4[![license](https://img.shields.io/github/license/nektro/zig-sys-linux.svg)](https://github.com/nektro/zig-sys-linux/blob/master/LICENSE)4[![license](https://img.shields.io/github/license/nektro/zig-sys-linux.svg)](https://github.com/nektro/zig-sys-linux/blob/master/LICENSE)
5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)
6[![Zig](https://img.shields.io/badge/Zig-0.15-f7a41d)](https://ziglang.org/)6[![Zig](https://img.shields.io/badge/Zig-0.16-f7a41d)](https://ziglang.org/)
7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
9OS bindings layer for interacting with Linux9OS bindings layer for interacting with Linux
mod.zig+29-6
...@@ -5,6 +5,7 @@ const arch = builtin.target.cpu.arch;...@@ -5,6 +5,7 @@ const arch = builtin.target.cpu.arch;
55
6comptime {6comptime {
7 std.debug.assert(builtin.target.os.tag == .linux);7 std.debug.assert(builtin.target.os.tag == .linux);
8 std.debug.assert(@bitSizeOf(usize) == 64);
8}9}
910
10pub const errno = struct {11pub const errno = struct {
...@@ -146,6 +147,7 @@ pub const errno = struct {...@@ -146,6 +147,7 @@ pub const errno = struct {
146147
147 pub const Enum = switch (builtin.target.cpu.arch) {148 pub const Enum = switch (builtin.target.cpu.arch) {
148 .arc,149 .arc,
150 .arceb,
149 .arm,151 .arm,
150 .armeb,152 .armeb,
151 .aarch64,153 .aarch64,
...@@ -156,13 +158,17 @@ pub const errno = struct {...@@ -156,13 +158,17 @@ pub const errno = struct {
156 .loongarch64,158 .loongarch64,
157 .m68k,159 .m68k,
158 .riscv32,160 .riscv32,
161 .riscv32be,
159 .riscv64,162 .riscv64,
163 .riscv64be,
160 .s390x,164 .s390x,
161 .sparc,165 .sparc,
162 .sparc64,166 .sparc64,
167 .x86_16,
163 .x86,168 .x86,
164 .x86_64,169 .x86_64,
165 .xtensa,170 .xtensa,
171 .xtensaeb,
166 => enum(c_ushort) {172 => enum(c_ushort) {
167 EPERM = 1,173 EPERM = 1,
168 ENOENT = 2,174 ENOENT = 2,
...@@ -856,12 +862,12 @@ pub const errno = struct {...@@ -856,12 +862,12 @@ pub const errno = struct {
856 pub const EWOULDBLOCK: Enum = .EAGAIN;862 pub const EWOULDBLOCK: Enum = .EAGAIN;
857 pub const ENOTSUP: Enum = .EOPNOTSUPP;863 pub const ENOTSUP: Enum = .EOPNOTSUPP;
858 },864 },
859 // alpha865 .alpha => unreachable,
866 .microblaze, .microblazeel => unreachable,
867 .sh, .sheb => unreachable,
860 // nios2868 // nios2
861 // microblaze
862 // openrisc869 // openrisc
863 // parisc870 // parisc
864 // sh
865 // um871 // um
866 // @compileError("TODO: " ++ @tagName(v)),872 // @compileError("TODO: " ++ @tagName(v)),
867 .avr,873 .avr,
...@@ -883,6 +889,9 @@ pub const errno = struct {...@@ -883,6 +889,9 @@ pub const errno = struct {
883 .wasm64,889 .wasm64,
884 .ve,890 .ve,
885 .or1k,891 .or1k,
892 .hppa,
893 .hppa64,
894 .kvx,
886 => unreachable,895 => unreachable,
887 };896 };
888897
...@@ -2857,9 +2866,23 @@ pub const struct_timeval = linux.timeval;...@@ -2857,9 +2866,23 @@ pub const struct_timeval = linux.timeval;
2857pub const DIR = opaque {};2866pub const DIR = opaque {};
2858pub const time_t = i64;2867pub const time_t = i64;
2859pub const div_t = extern struct { quot: c_int, rem: c_int };2868pub const div_t = extern struct { quot: c_int, rem: c_int };
2860pub const off_t = linux.off_t;2869pub const off_t = i64;
2861pub const ino_t = linux.ino_t;2870pub const ino_t = u64;
2862pub const struct_stat = linux.Stat;2871pub const dev_t = u64;
2872pub const nlink_t = c_ulong;
2873pub const blksize_t = c_long;
2874pub const blkcnt_t = i64;
2875pub const struct_stat = switch (arch) {
2876 .mips64, .mips64el => extern struct { dev: dev_t, __pad1: [3]c_int, ino: ino_t, mode: mode_t, nlink: nlink_t, uid: uid_t, gid: gid_t, rdev: dev_t, __pad2: [2]c_uint, size: off_t, __pad3: c_int, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, blksize: blksize_t, __pad4: c_uint, blocks: blkcnt_t, __pad5: [14]c_int },
2877 .powerpc64, .powerpc64le => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, rdev: dev_t, size: off_t, blksize: blksize_t, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [3]c_ulong },
2878 .s390x => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, rdev: dev_t, size: off_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, blksize: blksize_t, blocks: blkcnt_t, __unused: [3]c_ulong },
2879 .x86_64 => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, __pad0: c_uint, rdev: dev_t, size: off_t, blksize: blksize_t, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [3]c_long },
2880 // generic
2881 .aarch64,
2882 .riscv64,
2883 => extern struct { dev: dev_t, ino: ino_t, mode: mode_t, nlink: nlink_t, uid: uid_t, gid: gid_t, rdev: dev_t, __pad: c_ulonglong, size: off_t, blksize: blksize_t, __pad2: c_int, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [2]c_uint },
2884 else => unreachable,
2885};
2863pub const struct_iovec = extern struct { base: [*]u8, len: usize };2886pub const struct_iovec = extern struct { base: [*]u8, len: usize };
2864pub const in_addr_t = u32;2887pub const in_addr_t = u32;
2865pub const in_port_t = u16;2888pub const in_port_t = u16;