diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-05 16:57:14 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-05 16:57:14 -0500 |
| commit | fee9318b1756054ff7050bae72c87a1b63a6f968 (patch) | |
| tree | 232e1be13e56305b64400e0077a95907559a5f36 /lib/std/os/bits/linux.zig | |
| parent | 2f6b045fb13b6a49e5185fa0f4006bef1dacd0d7 (diff) | |
| download | zig-fee9318b1756054ff7050bae72c87a1b63a6f968.tar.gz zig-fee9318b1756054ff7050bae72c87a1b63a6f968.zip | |
std.os.getrusage: add C extern fn and reserved field
* add reserved field to match musl struct definition so that
it will work with musl libc.
* add libc getrusage so that it will work with libc
what's not done in this branch is:
* test coverage. See #1629, which should also aim to provide
general test coverage for the std lib.
* rusage struct bits for non-linux operating systems
Diffstat (limited to 'lib/std/os/bits/linux.zig')
| -rw-r--r-- | lib/std/os/bits/linux.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig index 6fa8bc1f36..678868a2c3 100644 --- a/lib/std/os/bits/linux.zig +++ b/lib/std/os/bits/linux.zig @@ -1475,4 +1475,5 @@ pub const rusage = extern struct { nsignals: isize, nvcsw: isize, nivcsw: isize, + __reserved: [16]isize = [1]isize{0} ** 16, }; |
