fix build with musl
parent
e891b40588
commit
a875951e82
2
malloc.c
2
malloc.c
|
@ -1049,9 +1049,11 @@ EXPORT int h_malloc_trim(UNUSED size_t pad) {
|
|||
|
||||
EXPORT void h_malloc_stats(void) {}
|
||||
|
||||
#if defined(__GLIBC__) || defined(__ANDROID__)
|
||||
EXPORT struct mallinfo h_mallinfo(void) {
|
||||
return (struct mallinfo){0};
|
||||
}
|
||||
#endif
|
||||
|
||||
EXPORT int h_malloc_info(UNUSED int options, UNUSED FILE *fp) {
|
||||
errno = ENOSYS;
|
||||
|
|
2
malloc.h
2
malloc.h
|
@ -51,7 +51,9 @@ size_t h_malloc_usable_size(void *ptr);
|
|||
int h_mallopt(int param, int value);
|
||||
int h_malloc_trim(size_t pad);
|
||||
void h_malloc_stats(void);
|
||||
#if defined(__GLIBC__) || defined(__ANDROID__)
|
||||
struct mallinfo h_mallinfo(void);
|
||||
#endif
|
||||
int h_malloc_info(int options, FILE *fp);
|
||||
|
||||
// obsolete glibc extensions
|
||||
|
|
Loading…
Reference in New Issue