Commit 11b98c90 authored by Ghislain MARY's avatar Ghislain MARY

Get HANDLE from fd for sqlite sync on Windows.

parent e047dcf8
......@@ -210,7 +210,7 @@ static int sqlite3bctbx_Sync(sqlite3_file *p, int flags){
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*)p;
#if _WIN32
int ret;
ret = FlushFileBuffers(pFile->pbctbx_file->h);
ret = FlushFileBuffers((HANDLE)_get_osfhandle(pFile->pbctbx_file->fd));
return (ret!=0 ? SQLITE_OK : SQLITE_IOERR_FSYNC);
#else
int rc = fsync(pFile->pbctbx_file->fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment