From 501691a3c07142fe4542ec5321ac5d11bf34989f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 1 Jun 2022 16:18:27 +0300 Subject: [PATCH] mdbx: add `__assert_fail()` macro for Android. --- src/osal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osal.c b/src/osal.c index d19c3d36..eb492eec 100644 --- a/src/osal.c +++ b/src/osal.c @@ -141,7 +141,13 @@ typedef struct _FILE_PROVIDER_EXTERNAL_INFO_V1 { /*----------------------------------------------------------------------------*/ -#if defined(__UCLIBC__) +#if defined(__ANDROID_API__) +__extern_C void __assert2(const char *file, int line, const char *function, + const char *msg) __noreturn; +#define __assert_fail(assertion, file, line, function) \ + __assert2(file, line, function, assertion) + +#elif defined(__UCLIBC__) __extern_C void __assert(const char *, const char *, unsigned int, const char *) #ifdef __THROW __THROW