summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-22 19:13:01 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-22 19:13:50 +0800
commitdfa607c1646be82bce5044941b7609c9bb1ccaa3 (patch)
tree3787d005b12090ec965a617a0be42e513898d6b3
parent8fef9a5cd9a16b2f91f2ad4e7edbcc49c3963d42 (diff)
downloademacs-dfa607c1646be82bce5044941b7609c9bb1ccaa3.tar.gz
Fix build on glibc <2.10
* src/alloc.c (Fmalloc_info): Only enable if glibc supports malloc_info. (syms_of_alloc): Likewise.
-rw-r--r--src/alloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index a3410be7e26..9ed94dc8a1e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7385,7 +7385,8 @@ Frames, windows, buffers, and subprocesses count as vectors
make_int (strings_consed));
}
-#if defined GNU_LINUX && defined __GLIBC__
+#if defined GNU_LINUX && defined __GLIBC__ && \
+ (__GLIBC__ > 2 || __GLIBC_MINOR__ >= 10)
DEFUN ("malloc-info", Fmalloc_info, Smalloc_info, 0, 0, "",
doc: /* Report malloc information to stderr.
This function outputs to stderr an XML-formatted
@@ -7745,7 +7746,9 @@ N should be nonnegative. */);
defsubr (&Sgarbage_collect_maybe);
defsubr (&Smemory_info);
defsubr (&Smemory_use_counts);
-#if defined GNU_LINUX && defined __GLIBC__
+#if defined GNU_LINUX && defined __GLIBC__ && \
+ (__GLIBC__ > 2 || __GLIBC_MINOR__ >= 10)
+
defsubr (&Smalloc_info);
#endif
defsubr (&Ssuspicious_object);