| ... | @@ -5643,7 +5643,10 @@ pub fn prctl(option: i32, args: anytype) PrctlError!u31 { | ... | @@ -5643,7 +5643,10 @@ pub fn prctl(option: i32, args: anytype) PrctlError!u31 { |
| 5643 | @compileError("prctl takes a maximum of 4 optional arguments"); | 5643 | @compileError("prctl takes a maximum of 4 optional arguments"); |
| 5644 | | 5644 | |
| 5645 | var buf: [4]usize = undefined; | 5645 | var buf: [4]usize = undefined; |
| 5646 | inline for (args) |arg, i| buf[i] = arg; | 5646 | { |
| | 5647 | comptime var i = 0; |
| | 5648 | inline while (i < args.len) : (i += 1) buf[i] = args[i]; |
| | 5649 | } |
| 5647 | | 5650 | |
| 5648 | const rc = system.prctl(option, buf[0], buf[1], buf[2], buf[3]); | 5651 | const rc = system.prctl(option, buf[0], buf[1], buf[2], buf[3]); |
| 5649 | switch (errno(rc)) { | 5652 | switch (errno(rc)) { |