diff --git a/src/cargo/util/flock.rs b/src/cargo/util/flock.rs index 3cc8979ef9c..0cdd9434495 100644 --- a/src/cargo/util/flock.rs +++ b/src/cargo/util/flock.rs @@ -406,7 +406,7 @@ mod sys { l_pad: [0, 0, 0, 0], }; flock.l_type = if flag & libc::LOCK_UN != 0 { - libc::F_RDLCK + libc::F_UNLCK } else if flag & libc::LOCK_EX != 0 { libc::F_WRLCK } else if flag & libc::LOCK_SH != 0 {