forge
Explore
Log in

Don't you dare go Hollow

fix 32 bit musl build: expected `i64`, found `i32`

Browse files at this commit

f18f27742bad0735589144880caaa421931d8eb6Pepper GrayParent: 90af637
building on 32-bit musl ppc fails with error:
```
expected `i64` because of return type
```
due to libc::syscall returning long which is `i32` on 32 bit systems.

Closes: #4681
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
src/utils/spawning.rsmodified+5 -1
@@ -220,7 +220,11 @@ mod systemd {
220220 use libc::closefrom;
221221
222222 #[cfg(not(target_env = "gnu"))] // musl
223- pub fn close_range(first: libc::c_uint, last: libc::c_uint, flags: libc::c_uint) -> i64 {
223+ pub fn close_range(
224+ first: libc::c_uint,
225+ last: libc::c_uint,
226+ flags: libc::c_uint,
227+ ) -> libc::c_long {
224228 unsafe {
225229 libc::syscall(
226230 libc::SYS_close_range,