From 7d383350e8b03f1e798809c088b64765c451301d Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Mon, 4 Mar 2019 14:41:29 +0300 Subject: [PATCH] mdbx: workaround for musl-libc __assert_fail() prototype bug. --- src/osal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osal.c b/src/osal.c index 6e7f9cbc..38f0156c 100644 --- a/src/osal.c +++ b/src/osal.c @@ -153,8 +153,10 @@ typedef struct _FILE_PROVIDER_EXTERNAL_INFO_V1 { /*----------------------------------------------------------------------------*/ -#ifndef _MSC_VER -/* Prototype should match libc runtime. ISO POSIX (2003) & LSB 3.1 */ +#if !defined(_MSC_VER) && \ + /* workaround for avoid musl libc wrong prototype */ ( \ + defined(__GLIBC__) || defined(__GNU_LIBRARY__)) +/* Prototype should match libc runtime. ISO POSIX (2003) & LSB 1.x-3.x */ __nothrow __noreturn void __assert_fail(const char *assertion, const char *file, unsigned line, const char *function); #endif /* _MSC_VER */