mirror of
https://git.freebsd.org/ports.git
synced 2025-05-04 23:47:37 -04:00
Changes: https://github.com/denoland/deno/releases/tag/v1.36.3 https://github.com/denoland/deno/releases/tag/v1.36.4 https://github.com/denoland/deno/releases/tag/v1.37.0 https://github.com/denoland/deno/releases/tag/v1.37.1
20 lines
830 B
Rust
20 lines
830 B
Rust
--- ext/node/ops/os.rs.orig 2023-08-21 14:55:59 UTC
|
|
+++ ext/node/ops/os.rs
|
|
@@ -68,7 +68,7 @@ mod priority {
|
|
set_errno(Errno(0));
|
|
match (
|
|
// SAFETY: libc::getpriority is unsafe
|
|
- unsafe { libc::getpriority(PRIO_PROCESS, pid as id_t) },
|
|
+ unsafe { libc::getpriority(PRIO_PROCESS, (pid as id_t).try_into().unwrap()) },
|
|
errno(),
|
|
) {
|
|
(-1, Errno(0)) => Ok(PRIORITY_HIGH),
|
|
@@ -79,7 +79,7 @@ mod priority {
|
|
|
|
pub fn set_priority(pid: u32, priority: i32) -> Result<(), AnyError> {
|
|
// SAFETY: libc::setpriority is unsafe
|
|
- match unsafe { libc::setpriority(PRIO_PROCESS, pid as id_t, priority) } {
|
|
+ match unsafe { libc::setpriority(PRIO_PROCESS, (pid as id_t).try_into().unwrap(), priority) } {
|
|
-1 => Err(std::io::Error::last_os_error().into()),
|
|
_ => Ok(()),
|
|
}
|