mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-22 08:49:26 +08:00
mdbx: fix mdbx_filesize() for Windows.
This commit is contained in:
@@ -552,7 +552,7 @@ int mdbx_filesize(mdbx_filehandle_t fd, uint64_t *length) {
|
|||||||
BY_HANDLE_FILE_INFORMATION info;
|
BY_HANDLE_FILE_INFORMATION info;
|
||||||
if (!GetFileInformationByHandle(fd, &info))
|
if (!GetFileInformationByHandle(fd, &info))
|
||||||
return mdbx_get_errno_checked();
|
return mdbx_get_errno_checked();
|
||||||
*length = info.nFileSizeLow | (uint64_t)info.nFileIndexHigh << 32;
|
*length = info.nFileSizeLow | (uint64_t)info.nFileSizeHigh << 32;
|
||||||
#else
|
#else
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user