mdbx: fix cross-build & qemu-testing issues.

Change-Id: I6b2343cc4e08c3cb706a190c4c515965182733a2
This commit is contained in:
Leonid Yuriev
2019-09-11 17:02:01 +03:00
parent 228a74c41d
commit 8f08e1c7ed
3 changed files with 7 additions and 6 deletions

View File

@@ -4814,7 +4814,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT
#if defined(__linux__) || defined(__gnu_linux__)
if (linux_kernel_version >= 0x02060b00)
if (mdbx_linux_kernel_version >= 0x02060b00)
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
* arguments, making this function fairly expensive. Therefore, the
* whole cache is always flushed. */
@@ -4839,7 +4839,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT && \
(defined(__linux__) || defined(__gnu_linux__))
if (linux_kernel_version < 0x02060b00) {
if (mdbx_linux_kernel_version < 0x02060b00) {
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
* arguments, making this function fairly expensive. Therefore, the whole
* cache is always flushed. */

View File

@@ -174,7 +174,8 @@
#ifndef MDBX_USE_OFDLOCKS
#define MDBX_USE_OFDLOCKS_CONFIG AUTO
#if defined(F_OFD_SETLK) && defined(F_OFD_SETLKW) && defined(F_OFD_GETLK)
#if defined(F_OFD_SETLK) && defined(F_OFD_SETLKW) && defined(F_OFD_GETLK) && \
!defined(MDBX_SAFE4QEMU)
#define MDBX_USE_OFDLOCKS 1
#else
#define MDBX_USE_OFDLOCKS 0