mdbx: fix builds with older libc versions after using fcntl64() (backport).

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-10-13 17:30:43 +03:00
parent 290630f118
commit 7b60363a31
2 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,13 @@
ChangeLog
---------
## v0.11.x
Fixes:
- Fixed builds with older libc versions after using `fcntl64()` (backport).
## v0.11.12 (Эребуни) at 2022-10-12
The stable bugfix release.

View File

@ -294,7 +294,14 @@ MDBX_MAYBE_UNUSED static __inline void mdbx_jitter4testing(bool tiny);
#define MDBX_F_SETLK F_SETLK64
#define MDBX_F_SETLKW F_SETLKW64
#define MDBX_F_GETLK F_GETLK64
#if (__GLIBC_PREREQ(2, 28) && \
(defined(__USE_LARGEFILE64) || defined(__LARGEFILE64_SOURCE) || \
defined(_USE_LARGEFILE64) || defined(_LARGEFILE64_SOURCE))) || \
defined(fcntl64)
#define MDBX_FCNTL fcntl64
#else
#define MDBX_FCNTL fcntl
#endif
#define MDBX_STRUCT_FLOCK struct flock64
#ifndef OFF_T_MAX
#define OFF_T_MAX UINT64_C(0x7fffFFFFfff00000)