mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 15:34:18 +08:00
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs
|
|
index 5d7e3c5a6..b7de5655f 100644
|
|
--- a/crates/cargo-util/src/paths.rs
|
|
+++ b/crates/cargo-util/src/paths.rs
|
|
@@ -201,7 +201,7 @@ pub fn write_atomic<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Res
|
|
use std::os::unix::fs::PermissionsExt;
|
|
|
|
// these constants are u16 on macOS
|
|
- let mask = u32::from(libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO);
|
|
+ let mask = (libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO) as u32;
|
|
let mode = meta.permissions().mode() & mask;
|
|
|
|
std::fs::Permissions::from_mode(mode)
|
|
@@ -611,8 +611,6 @@ fn _link_or_copy(src: &Path, dst: &Path) -> Result<()> {
|
|
}
|
|
|
|
let link_result = if src.is_dir() {
|
|
- #[cfg(target_os = "redox")]
|
|
- use std::os::redox::fs::symlink;
|
|
#[cfg(unix)]
|
|
use std::os::unix::fs::symlink;
|
|
#[cfg(windows)]
|
|
diff --git a/src/cargo/core/compiler/build_config.rs b/src/cargo/core/compiler/build_config.rs
|
|
index 80aa592dd..d40c2056b 100644
|
|
--- a/src/cargo/core/compiler/build_config.rs
|
|
+++ b/src/cargo/core/compiler/build_config.rs
|
|
@@ -51,9 +51,7 @@ pub struct BuildConfig {
|
|
}
|
|
|
|
fn default_parallelism() -> CargoResult<u32> {
|
|
- Ok(available_parallelism()
|
|
- .context("failed to determine the amount of parallelism available")?
|
|
- .get() as u32)
|
|
+ Ok(1)
|
|
}
|
|
|
|
impl BuildConfig {
|