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 @@
33![loc](https://sloc.xyz/github/nektro/zig-sys-linux)
44[![license](https://img.shields.io/github/license/nektro/zig-sys-linux.svg)](https://github.com/nektro/zig-sys-linux/blob/master/LICENSE)
55[![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/)
77[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
99OS bindings layer for interacting with Linux
mod.zig+29-6
......@@ -5,6 +5,7 @@ const arch = builtin.target.cpu.arch;
55
66comptime {
77 std.debug.assert(builtin.target.os.tag == .linux);
8 std.debug.assert(@bitSizeOf(usize) == 64);
89}
910
1011pub const errno = struct {
......@@ -146,6 +147,7 @@ pub const errno = struct {
146147
147148 pub const Enum = switch (builtin.target.cpu.arch) {
148149 .arc,
150 .arceb,
149151 .arm,
150152 .armeb,
151153 .aarch64,
......@@ -156,13 +158,17 @@ pub const errno = struct {
156158 .loongarch64,
157159 .m68k,
158160 .riscv32,
161 .riscv32be,
159162 .riscv64,
163 .riscv64be,
160164 .s390x,
161165 .sparc,
162166 .sparc64,
167 .x86_16,
163168 .x86,
164169 .x86_64,
165170 .xtensa,
171 .xtensaeb,
166172 => enum(c_ushort) {
167173 EPERM = 1,
168174 ENOENT = 2,
......@@ -856,12 +862,12 @@ pub const errno = struct {
856862 pub const EWOULDBLOCK: Enum = .EAGAIN;
857863 pub const ENOTSUP: Enum = .EOPNOTSUPP;
858864 },
859 // alpha
865 .alpha => unreachable,
866 .microblaze, .microblazeel => unreachable,
867 .sh, .sheb => unreachable,
860868 // nios2
861 // microblaze
862869 // openrisc
863870 // parisc
864 // sh
865871 // um
866872 // @compileError("TODO: " ++ @tagName(v)),
867873 .avr,
......@@ -883,6 +889,9 @@ pub const errno = struct {
883889 .wasm64,
884890 .ve,
885891 .or1k,
892 .hppa,
893 .hppa64,
894 .kvx,
886895 => unreachable,
887896 };
888897
......@@ -2857,9 +2866,23 @@ pub const struct_timeval = linux.timeval;
28572866pub const DIR = opaque {};
28582867pub const time_t = i64;
28592868pub const div_t = extern struct { quot: c_int, rem: c_int };
2860pub const off_t = linux.off_t;
2861pub const ino_t = linux.ino_t;
2862pub const struct_stat = linux.Stat;
2869pub const off_t = i64;
2870pub const ino_t = u64;
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};
28632886pub const struct_iovec = extern struct { base: [*]u8, len: usize };
28642887pub const in_addr_t = u32;
28652888pub const in_port_t = u16;