1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Cast the 2nd parameter of ftruncate to off_t to work around bugs in

some unix implementations.  Ticket #2425. (CVS 4089)

FossilOrigin-Name: 0b20a69609c64af922bedab381f7d075e9da4fc5
This commit is contained in:
drh
2007-06-19 10:50:38 +00:00
parent 74792b2f91
commit 63fff5f7a5
3 changed files with 8 additions and 8 deletions

View File

@@ -1271,7 +1271,7 @@ int sqlite3UnixSyncDirectory(const char *zDirname){
static int unixTruncate(OsFile *id, i64 nByte){
int rc;
assert( id );
rc = ftruncate(((unixFile*)id)->h, nByte);
rc = ftruncate(((unixFile*)id)->h, (off_t)nByte);
SimulateIOError( rc=1 );
if( rc ){
return SQLITE_IOERR_TRUNCATE;