aboutsummaryrefslogtreecommitdiff
path: root/std/os/bits
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-05-30 15:48:22 -0400
committerGitHub <noreply@github.com>2019-05-30 15:48:22 -0400
commit0ccd91faea5ec27a1dce9d3bae84e1feca7fc0ea (patch)
tree6aa7ef4a698b9ed7d634e88cf4e1a3a29dfdc082 /std/os/bits
parent78f32259daa79aaced1c49bcdace936121a2ccc5 (diff)
parent51fc375b0d17f50bb6e0a542e9eebfff1534c581 (diff)
downloadzig-0ccd91faea5ec27a1dce9d3bae84e1feca7fc0ea.tar.gz
zig-0ccd91faea5ec27a1dce9d3bae84e1feca7fc0ea.zip
Merge pull request #2593 from LemonBoy/aarch64-stuff
Fix some syscalls on arm64
Diffstat (limited to 'std/os/bits')
-rw-r--r--std/os/bits/linux.zig12
-rw-r--r--std/os/bits/linux/arm64.zig10
2 files changed, 11 insertions, 11 deletions
diff --git a/std/os/bits/linux.zig b/std/os/bits/linux.zig
index 4a1734a145..ff541077d9 100644
--- a/std/os/bits/linux.zig
+++ b/std/os/bits/linux.zig
@@ -762,16 +762,16 @@ pub const epoll_data = extern union {
// On x86_64 the structure is packed so that it matches the definition of its
// 32bit counterpart
-pub const epoll_event = if (builtin.arch != .x86_64)
- extern struct {
+pub const epoll_event = switch (builtin.arch) {
+ .x86_64 => packed struct {
events: u32,
data: epoll_data,
- }
-else
- packed struct {
+ },
+ else => extern struct {
events: u32,
data: epoll_data,
- };
+ },
+};
pub const _LINUX_CAPABILITY_VERSION_1 = 0x19980330;
pub const _LINUX_CAPABILITY_U32S_1 = 1;
diff --git a/std/os/bits/linux/arm64.zig b/std/os/bits/linux/arm64.zig
index 8966df30d2..527b78bbcd 100644
--- a/std/os/bits/linux/arm64.zig
+++ b/std/os/bits/linux/arm64.zig
@@ -299,16 +299,16 @@ pub const O_NONBLOCK = 0o4000;
pub const O_DSYNC = 0o10000;
pub const O_SYNC = 0o4010000;
pub const O_RSYNC = 0o4010000;
-pub const O_DIRECTORY = 0o200000;
-pub const O_NOFOLLOW = 0o400000;
+pub const O_DIRECTORY = 0o40000;
+pub const O_NOFOLLOW = 0o100000;
pub const O_CLOEXEC = 0o2000000;
pub const O_ASYNC = 0o20000;
-pub const O_DIRECT = 0o40000;
-pub const O_LARGEFILE = 0;
+pub const O_DIRECT = 0o200000;
+pub const O_LARGEFILE = 0o400000;
pub const O_NOATIME = 0o1000000;
pub const O_PATH = 0o10000000;
-pub const O_TMPFILE = 0o20200000;
+pub const O_TMPFILE = 0o20040000;
pub const O_NDELAY = O_NONBLOCK;
pub const F_DUPFD = 0;