Andreas Linz 7e63f7ad03
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
2020-12-23 11:16:27 +02:00
..
2020-12-09 13:54:26 +02:00
2020-12-23 10:59:14 +02:00
2020-12-09 13:54:26 +02:00
2020-12-23 01:27:12 +02:00
2020-10-28 10:03:23 +01:00
2020-12-13 00:40:35 +01:00
2020-11-19 00:58:13 +11:00
2020-11-30 10:40:16 -08:00
2020-12-20 01:24:59 +02:00
2020-09-11 20:02:41 -04:00
2020-12-23 11:02:05 +02:00
2020-12-13 23:21:23 -05:00
2020-12-09 13:54:26 +02:00
2020-12-17 19:09:29 +02:00
2020-12-23 01:27:12 +02:00
2020-12-10 21:19:41 +02:00
2020-12-16 12:14:44 +02:00
2020-12-09 13:54:26 +02:00
2020-12-01 19:13:59 -05:00
2020-12-09 13:54:26 +02:00
2020-12-20 15:08:59 -07:00