diff options
Diffstat (limited to 'sqlite')
| -rw-r--r-- | sqlite/sqlite/sqlite3.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sqlite/sqlite/sqlite3.c b/sqlite/sqlite/sqlite3.c index e558fd1c7..85c45ac0d 100644 --- a/sqlite/sqlite/sqlite3.c +++ b/sqlite/sqlite/sqlite3.c @@ -42840,8 +42840,12 @@ static int unixLockSharedMemory(unixFile *pDbFd, unixShmNode *pShmNode){ ** -shm header size) rather than 0 as a system debugging aid, to ** help detect if a -shm file truncation is legitimate or is the work ** or a rogue process. */ - /* Fix SQLite DB corruption on some Samsung devices (3 changed to 0) */ +#ifdef __ANDROID__ + /* Fix SQLite DB corruption on some Samsung devices */ if( rc==SQLITE_OK && robust_ftruncate(pShmNode->hShm, 0) ){ +#else + if( rc==SQLITE_OK && robust_ftruncate(pShmNode->hShm, 3) ){ +#endif rc = unixLogError(SQLITE_IOERR_SHMOPEN,"ftruncate",pShmNode->zFilename); } } |
