# std.posix: remove unchecked std.os.linux usage · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5f2bdafa39255234381076d4095140f922d21577)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5f2bdafa39255234381076d4095140f922d21577

Requested commit: 5f2bdafa39255234381076d4095140f922d21577

Commit: 5f2bdafa39255234381076d4095140f922d21577

Tree: 75f1b0410af558e1176c3e4bb95715d627a62235

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
std.posix: remove unchecked std.os.linux usage

Using std.os.linux directly in e.g. std.posix.timerfd_create() causes
the function to compile but silently fail at runtime when targeting any
OS other than Linux.

To catch errors like this at compile time, std.os.linux must only be
directly accessed within std.posix where there has been a comptime check
that the target os is in fact Linux.

```

## Parents

- [7dc52a367ae6bf7d9adbe72f1d3c34103c3c6a4f](https://git.cafe/gitcafe/zig/commit/7dc52a367ae6bf7d9adbe72f1d3c34103c3c6a4f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5f2bdafa39255234381076d4095140f922d21577?format=markdown)
