mdbx: portability - support for non-_GNU_SOURCE mode.

Change-Id: I9988d0ea8a9ddc06c799c65c4b2728bd17ff77e7
This commit is contained in:
Leonid Yuriev
2019-07-14 00:49:00 +03:00
parent 41f00485fd
commit 2544a621e7
2 changed files with 3 additions and 2 deletions

View File

@@ -434,7 +434,8 @@ static __inline void mdbx_invalidate_cache(void *addr, size_t nbytes) {
/*----------------------------------------------------------------------------*/
/* libc compatibility stuff */
#if __GLIBC_PREREQ(2, 1)
#if (!defined(__GLIBC__) && __GLIBC_PREREQ(2, 1)) && \
(defined(_GNU_SOURCE) || defined(_BSD_SOURCE))
#define mdbx_asprintf asprintf
#define mdbx_vasprintf vasprintf
#else