Skip to content

Commit

Permalink
Auto merge of #10975 - theCapypara:flock-enosys-android, r=weihanglo
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
bors committed Aug 16, 2022
2 parents 8494149 + b0c9586 commit 5a7ba9c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/cargo/util/flock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ mod sys {
// For targets in which they are the same, the duplicate pattern causes a warning.
#[allow(unreachable_patterns)]
Some(libc::ENOTSUP | libc::EOPNOTSUPP) => true,
#[cfg(target_os = "linux")]
Some(libc::ENOSYS) => true,
_ => false,
}
Expand Down

0 comments on commit 5a7ba9c

Please sign in to comment.