Skip to content

Commit dd0855d

Browse files
fix casting of PRIO_PGRP
1 parent 4f88106 commit dd0855d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/bootstrap/lib.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,9 @@ mod job;
115115
mod job {
116116
use libc;
117117

118-
//apparently glibc defines their own enum for this parameter, in a different type
119-
#[cfg(not(any(target_env = "musl", target_env = "musleabi", target_env = "musleabihf",
120-
target_os = "emscripten", target_arch = "mips", target_arch = "mipsel")))]
121-
const PRIO_PGRP: libc::c_uint = libc::PRIO_PGRP as libc::c_uint;
122-
#[cfg(any(target_env = "musl", target_env = "musleabi", target_env = "musleabihf",
123-
target_os = "emscripten", target_arch = "mips", target_arch = "mipsel"))]
124-
const PRIO_PGRP: libc::c_int = libc::PRIO_PGRP;
125-
126118
pub unsafe fn setup(build: &mut ::Build) {
127119
if build.config.low_priority {
128-
libc::setpriority(PRIO_PGRP, 0, 10);
120+
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
129121
}
130122
}
131123
}

0 commit comments

Comments
 (0)