| author | |
| committer | |
| log | 002ee8e6d38024b9a7db90347c3fb9189edd1bc8 |
| tree | be5bfe271c96c81ca258c337597afd46d247df11 |
| parent | 3f956f98903214a6a79a123d62c4084ea3ba49f9 |
| signature |
lseek() on x32/n32 returns u64 despite usize == u32.1 files changed, 2 insertions(+), 2 deletions(-)
lib/std/os/linux.zig+2-2| ... | ... | @@ -752,8 +752,8 @@ fn splitValue64(val: i64) [2]u32 { |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | /// Get the errno from a syscall return value. SUCCESS means no error. |
| 755 | pub fn errno(r: usize) E { | |
| 756 | const signed_r: isize = @bitCast(r); | |
| 755 | pub fn errno(r: u64) E { | |
| 756 | const signed_r: i32 = @bitCast(@as(u32, @truncate(r))); | |
| 757 | 757 | const int = if (signed_r > -4096 and signed_r < 0) -signed_r else 0; |
| 758 | 758 | return @enumFromInt(int); |
| 759 | 759 | } |