mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-01-04 04:10:54 -05:00
make __GLIBC_PREREQ check for mallinfo2 portable
This commit is contained in:
parent
93a87ce30b
commit
27fcfccb67
@ -1797,9 +1797,13 @@ EXPORT void h_malloc_stats(void) {}
|
|||||||
EXPORT struct mallinfo h_mallinfo(void) {
|
EXPORT struct mallinfo h_mallinfo(void) {
|
||||||
return (struct mallinfo){0};
|
return (struct mallinfo){0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __GLIBC_PREREQ(2, 33)
|
||||||
|
#define HAVE_MALLINFO2
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__GLIBC__) && __GLIBC_PREREQ(2, 33)) || defined(__ANDROID__)
|
#if defined(HAVE_MALLINFO2) || defined(__ANDROID__)
|
||||||
#ifndef __GLIBC__
|
#ifndef __GLIBC__
|
||||||
EXPORT struct mallinfo h_mallinfo(void) {
|
EXPORT struct mallinfo h_mallinfo(void) {
|
||||||
struct mallinfo info = {0};
|
struct mallinfo info = {0};
|
||||||
|
Loading…
Reference in New Issue
Block a user