bug: fix build on FreeBSD on ARM / POWER (#1817)

Both ARM and POWER use unsigned char. This PR fixes `process_ext.rs` to use `libc::c_char` rather than the previous `i8`.
This commit is contained in:
Piotr Kubaj 2025-09-17 15:37:39 +00:00 committed by GitHub
parent e4b814fd0b
commit 59b1db530d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,7 +172,7 @@ fn convert_process_status_to_char(status: ProcessStatus) -> char {
_ => '?'
}
} else if #[cfg(target_os = "freebsd")] {
const fn assert_u8(val: i8) -> u8 {
const fn assert_u8(val: libc::c_char) -> u8 {
if val < 0 { panic!("there was an invalid i8 constant that is supposed to be a char") } else { val as u8 }
}