Skip to content

Commit 6963df3

Browse files
committed
Treat EOPNOTSUPP the same as ENOTSUP when ignoring failed flock calls.
1 parent 451a043 commit 6963df3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cargo/util/flock.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ mod sys {
374374

375375
pub(super) fn error_unsupported(err: &Error) -> bool {
376376
match err.raw_os_error() {
377-
Some(libc::ENOTSUP) => true,
377+
// Unfortunately, depending on the target, these may or may not be the same.
378+
// For targets in which they are the same, the duplicate pattern causes a warning.
379+
#[allow(unreachable_patterns)]
380+
Some(libc::ENOTSUP | libc::EOPNOTSUPP) => true,
378381
#[cfg(target_os = "linux")]
379382
Some(libc::ENOSYS) => true,
380383
_ => false,

0 commit comments

Comments
 (0)