Fixes flock(fd, LOCK_UN) emulation on Solaris.

Follow up fix for #11421.
This commit is contained in:
Petr Sumbera 2022-12-12 08:03:07 +01:00
parent 4a8d17e236
commit f28b77c4ad

View File

@ -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 {