Skip to content

Commit 5a7ba9c

Browse files
committed
Auto merge of #10975 - theCapypara:flock-enosys-android, r=weihanglo
Fix file locking being not supported on Android raising an error This PR fixes #10972 by not failing Cargo operations when the `target_os` is Android and file locking is being reported as not being implemented by the kernel. I am sadly unable to actually test this at the moment, since despite my best efforts I am not able to get Cargo actually cross-compiled for Android (aarch64-linux-android). I however don't see any reason why this wouldn't work. `target_os` is "android" on Android and not "linux".
2 parents 8494149 + b0c9586 commit 5a7ba9c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/cargo/util/flock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ mod sys {
378378
// For targets in which they are the same, the duplicate pattern causes a warning.
379379
#[allow(unreachable_patterns)]
380380
Some(libc::ENOTSUP | libc::EOPNOTSUPP) => true,
381-
#[cfg(target_os = "linux")]
382381
Some(libc::ENOSYS) => true,
383382
_ => false,
384383
}

0 commit comments

Comments
 (0)