aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-06-02 14:37:39 +0000
committerdrh <drh@noemail.net>2018-06-02 14:37:39 +0000
commit789df14b1150b5f3018665ff0112500b0527cda9 (patch)
treec9e16492a7b14de0d1b213a5d7950cd22e43e1f2 /src/os_unix.c
parente893e2e4eec8820ca7d1613c94b0e38c83ae9fb3 (diff)
downloadsqlite-789df14b1150b5f3018665ff0112500b0527cda9.tar.gz
sqlite-789df14b1150b5f3018665ff0112500b0527cda9.zip
Proposed fix for the use of posix_fallocate() so that it handles EINVAL
returns correctly. FossilOrigin-Name: ab3a5539db82814cafb832cdaebd1e14566139306453ef9cdba6b244a994fe0b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 2b9c117e3..0dd461da0 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3779,7 +3779,7 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
do{
err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
}while( err==EINTR );
- if( err ) return SQLITE_IOERR_WRITE;
+ if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;
#else
/* If the OS does not have posix_fallocate(), fake it. Write a
** single byte to the last byte in each block that falls entirely