Index: src/os_unix.c ================================================================== --- src/os_unix.c +++ src/os_unix.c @@ -3755,11 +3755,15 @@ ** zFilename remains valid until file is closed, to support */ pNew->lockingContext = (void*)zFilename; #endif } - if( pLockingStyle == &posixIoMethods || pLockingStyle == &nfsIoMethods ){ + if( pLockingStyle == &posixIoMethods +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE + || pLockingStyle == &nfsIoMethods +#endif + ){ unixEnterMutex(); rc = findLockInfo(pNew, &pNew->pLock, &pNew->pOpen); if( rc!=SQLITE_OK ){ /* If an error occured in findLockInfo(), close the file descriptor ** immediately, before releasing the mutex. findLockInfo() may fail