diff --git a/Makefile b/Makefile index 6a79300c..82af31e0 100644 --- a/Makefile +++ b/Makefile @@ -218,5 +218,7 @@ cross-qemu: @echo " 2) apt install binfmt-support qemu-user-static qemu-user qemu-system-arm qemu-system-mips qemu-system-misc qemu-system-ppc qemu-system-sparc" @for CC in $(CROSS_LIST); do \ echo "===================== $$CC + qemu"; \ - $(MAKE) clean && CC=$$CC CXX=$$(echo $$CC | sed 's/-gcc/-g++/') EXE_LDFLAGS=-static $(MAKE) check-singleprocess || exit $$?; \ + $(MAKE) clean && \ + CC=$$CC CXX=$$(echo $$CC | sed 's/-gcc/-g++/') EXE_LDFLAGS=-static XCFLAGS="-DMDBX_SAFE4QEMU $(XCFLAGS)" \ + $(MAKE) check-singleprocess || exit $$?; \ done diff --git a/src/lck-posix.c b/src/lck-posix.c index 97439553..2633d447 100644 --- a/src/lck-posix.c +++ b/src/lck-posix.c @@ -1,4 +1,4 @@ -/* +/* * Copyright 2015-2018 Leonid Yuriev * and other libmdbx authors: please see AUTHORS file. * All rights reserved. @@ -149,7 +149,7 @@ int __cold mdbx_lck_init(MDBX_env *env) { goto bailout; #endif /* MDBX_USE_ROBUST */ -#if _POSIX_C_SOURCE >= 199506L +#if _POSIX_C_SOURCE >= 199506L && !defined(MDBX_SAFE4QEMU) rc = pthread_mutexattr_setprotocol(&ma, PTHREAD_PRIO_INHERIT); if (rc == ENOTSUP) rc = pthread_mutexattr_setprotocol(&ma, PTHREAD_PRIO_NONE); diff --git a/test/utils.cc b/test/utils.cc index 05d28f0c..622c4d09 100644 --- a/test/utils.cc +++ b/test/utils.cc @@ -186,7 +186,8 @@ uint64_t entropy_ticks(void) { ticks |= low & /* zeroes if high part has changed */ ~(high_before - high_after); #endif -#elif defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH > 7) +#elif (defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH > 7)) && \ + !defined(MDBX_SAFE4QEMU) uint64_t virtual_timer; __asm __volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer)); return virtual_timer;