From 494436c904b86193634de24e73d3b456a14e4f2d Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 19 Apr 2019 16:23:14 -0400 Subject: [PATCH] implement options handling for malloc_info --- h_malloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/h_malloc.c b/h_malloc.c index 517af02..bdd563e 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1727,7 +1727,11 @@ EXPORT struct mallinfo h_mallinfo(void) { #endif #ifdef __GLIBC__ -EXPORT int h_malloc_info(UNUSED int options, UNUSED FILE *fp) { +EXPORT int h_malloc_info(int options, UNUSED FILE *fp) { + if (options) { + errno = EINVAL; + return -1; + } errno = ENOSYS; return -1; }