I am not sure what the best way to achieve this is.
Exporting linux from lib/std/os.zig only when native_os == .linux solves the problem. But after that, I am not sure if std.os.linux is still visible in the documentation, unless you build the documentation in linux.
if (builtin.os.tag != .linux) @compileError("unsupported OS");
checks in functions that require targeting Linux. Putting that in all the syscall0, syscall1, etc functions would probably handle most (if not all?) of it.
Unsure if there are parts of std.os.linux that are intended to be usable when not targeting Linux. I know there are in std.os.windows, e.g.: