diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index edbf36f30..473432be5 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1349,6 +1349,11 @@ static int _posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){ ** 4: [RRRR.] */ if( eFileLock==SHARED_LOCK ){ + +#if !defined(__APPLE__) || !SQLITE_ENABLE_LOCKING_STYLE + assert( handleNFSUnlock==0 ); +#endif +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE if( handleNFSUnlock ){ off_t divSize = SHARED_SIZE - 1; @@ -1388,7 +1393,9 @@ static int _posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){ } goto end_unlock; } - }else{ + }else +#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */ + { lock.l_type = F_RDLCK; lock.l_whence = SEEK_SET; lock.l_start = SHARED_FIRST; |