diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 38492b3b6..61e8976c3 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -796,7 +796,7 @@ int sqlite3OsLock(OsFile *id, int locktype){ if( locktype==SHARED_LOCK || (locktype==EXCLUSIVE_LOCK && id->locktype<PENDING_LOCK) ){ - lock.l_type = F_RDLCK; + lock.l_type = (locktype==SHARED_LOCK?F_RDLCK:F_WRLCK); lock.l_start = PENDING_BYTE; s = fcntl(id->h, F_SETLK, &lock); if( s ){ |