Skip to content

Commit 27fcfcc

Browse files
committed
make __GLIBC_PREREQ check for mallinfo2 portable
1 parent 93a87ce commit 27fcfcc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

h_malloc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,9 +1797,13 @@ EXPORT void h_malloc_stats(void) {}
17971797
EXPORT struct mallinfo h_mallinfo(void) {
17981798
return (struct mallinfo){0};
17991799
}
1800+
1801+
#if __GLIBC_PREREQ(2, 33)
1802+
#define HAVE_MALLINFO2
1803+
#endif
18001804
#endif
18011805

1802-
#if (defined(__GLIBC__) && __GLIBC_PREREQ(2, 33)) || defined(__ANDROID__)
1806+
#if defined(HAVE_MALLINFO2) || defined(__ANDROID__)
18031807
#ifndef __GLIBC__
18041808
EXPORT struct mallinfo h_mallinfo(void) {
18051809
struct mallinfo info = {0};

0 commit comments

Comments
 (0)