mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 22:54:12 +08:00
mdbx: fix build with uclibc.
Change-Id: I907fecd84b335a84d5f1dcaa44ac489c4dfb1907
This commit is contained in:
parent
12770cae88
commit
1e3f633665
1
.github/actions/spelling/expect.txt
vendored
1
.github/actions/spelling/expect.txt
vendored
@ -1623,6 +1623,7 @@ typename
|
||||
ubsan
|
||||
ubuntu
|
||||
ucf
|
||||
UCLIBC
|
||||
UCRT
|
||||
udelay
|
||||
ue
|
||||
|
@ -165,7 +165,7 @@
|
||||
/** Advanced: Using sendfile() syscall (autodetection by default). */
|
||||
#ifndef MDBX_USE_SENDFILE
|
||||
#if ((defined(__linux__) || defined(__gnu_linux__)) && \
|
||||
__GLIBC_PREREQ(2, 3)) || \
|
||||
!defined(__ANDROID_API__)) || \
|
||||
(defined(__ANDROID_API__) && __ANDROID_API__ >= 21)
|
||||
#define MDBX_USE_SENDFILE 1
|
||||
#else
|
||||
@ -184,8 +184,8 @@
|
||||
|
||||
/** Advanced: Using sync_file_range() syscall (autodetection by default). */
|
||||
#ifndef MDBX_USE_SYNCFILERANGE
|
||||
#if ((defined(__linux__) || defined(__gnu_linux__)) && __GLIBC_PREREQ(2, 6) && \
|
||||
defined(_GNU_SOURCE)) || \
|
||||
#if ((defined(__linux__) || defined(__gnu_linux__)) && \
|
||||
defined(SYNC_FILE_RANGE_WRITE) && !defined(__ANDROID_API__)) || \
|
||||
(defined(__ANDROID_API__) && __ANDROID_API__ >= 26)
|
||||
#define MDBX_USE_SYNCFILERANGE 1
|
||||
#else
|
||||
|
13
src/osal.c
13
src/osal.c
@ -134,7 +134,18 @@ typedef struct _FILE_PROVIDER_EXTERNAL_INFO_V1 {
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#if _POSIX_C_SOURCE > 200212 && \
|
||||
#if defined(__UCLIBC__)
|
||||
__extern_C void __assert(const char *, const char *, unsigned int, const char *)
|
||||
#ifdef __THROW
|
||||
__THROW
|
||||
#else
|
||||
__nothrow
|
||||
#endif /* __THROW */
|
||||
__noreturn;
|
||||
#define __assert_fail(assertion, file, line, function) \
|
||||
__assert(assertion, file, line, function)
|
||||
|
||||
#elif _POSIX_C_SOURCE > 200212 && \
|
||||
/* 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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user