mdbx: fix regression related to fallocate() and introduce osal_fsetsize() (backport).

This fixes regression after the 2930b304dc as when
a DXB file remains longer than necessary on Mac or Linux when building without `_GNU_SOURCE`.
This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-10-18 12:34:26 +03:00
parent e09d835766
commit 2172c4f60a
6 changed files with 66 additions and 38 deletions

View File

@@ -433,8 +433,7 @@ enum osal_syncmode_bits {
};
MDBX_INTERNAL int osal_fsync(mdbx_filehandle_t fd, const enum osal_syncmode_bits mode_bits);
MDBX_INTERNAL int osal_ftruncate(mdbx_filehandle_t fd, uint64_t length);
MDBX_INTERNAL int osal_fallocate(mdbx_filehandle_t fd, uint64_t length);
MDBX_INTERNAL int osal_fsetsize(mdbx_filehandle_t fd, const uint64_t length);
MDBX_INTERNAL int osal_fseek(mdbx_filehandle_t fd, uint64_t pos);
MDBX_INTERNAL int osal_filesize(mdbx_filehandle_t fd, uint64_t *length);