mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 20:54:03 +02:00
Merge pull request #3450
4c0b2cd
Win32: use a more modern API call in FileCommit() (Philip Kaufmann)
This commit is contained in:
@@ -1103,7 +1103,8 @@ void FileCommit(FILE *fileout)
|
||||
{
|
||||
fflush(fileout); // harmless if redundantly called
|
||||
#ifdef WIN32
|
||||
_commit(_fileno(fileout));
|
||||
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
|
||||
FlushFileBuffers(hFile);
|
||||
#else
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
fdatasync(fileno(fileout));
|
||||
|
Reference in New Issue
Block a user