diff options
| author | Andreas Linz <klingt.net@gmail.com> | 2020-12-23 10:16:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-23 11:16:27 +0200 |
| commit | 7e63f7ad0311c80bcec89649d723af8a97935ba2 (patch) | |
| tree | c5186540d15202aa105e1853bf14ef52d37f8eb0 /src/stage1/codegen.cpp | |
| parent | 4420dabdf5cb1ad421d62d946738eb61fcff0ce5 (diff) | |
| download | zig-7e63f7ad0311c80bcec89649d723af8a97935ba2.tar.gz zig-7e63f7ad0311c80bcec89649d723af8a97935ba2.zip | |
Truncate user and group ids for 64 bit Linux systems (#7466)
* Truncate user and group ids
Calls to `getuid`, `getgid` and their `eid` variants fail to compile on
64bit Linux systems because the return value of the syscall is of
`usize` and needs to be truncated to fit the size of `uid_t` that is 32
bit.
Thanks to @FireFox317 for figuring this out in Zig's Discord channel!
* Add a regression test for user and group ids
* Replace @truncate with @intCast
This should be safe because `uid_t` will be 32-bit.
* Add missing import for getauxval
* Add missing package names
* Revert "Add missing import for getauxval"
This reverts commit 38f93dc89effdf657f2b81a56b96527ce4083f52.
* Skip user and group test if builtin.link_libc
Diffstat (limited to 'src/stage1/codegen.cpp')
0 files changed, 0 insertions, 0 deletions
