]> git.lizzy.rs Git - rust.git/commitdiff
fix casting of PRIO_PGRP
authorQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 19 May 2017 03:24:34 +0000 (22:24 -0500)
committerQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 19 May 2017 03:24:34 +0000 (22:24 -0500)
src/bootstrap/lib.rs

index a9f53cda7ed2636f03adeca707d07daf1a183881..081e1e5264538df8ce6a3c00eceb44a2401da094 100644 (file)
 mod job {
     use libc;
 
-    //apparently glibc defines their own enum for this parameter, in a different type
-    #[cfg(not(any(target_env = "musl", target_env = "musleabi", target_env = "musleabihf",
-                  target_os = "emscripten", target_arch = "mips", target_arch = "mipsel")))]
-    const PRIO_PGRP: libc::c_uint = libc::PRIO_PGRP as libc::c_uint;
-    #[cfg(any(target_env = "musl", target_env = "musleabi", target_env = "musleabihf",
-              target_os = "emscripten", target_arch = "mips", target_arch = "mipsel"))]
-    const PRIO_PGRP: libc::c_int = libc::PRIO_PGRP;
-
     pub unsafe fn setup(build: &mut ::Build) {
         if build.config.low_priority {
-            libc::setpriority(PRIO_PGRP, 0, 10);
+            libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
         }
     }
 }