aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPo Lu2022-02-22 19:13:01 +0800
committerPo Lu2022-02-22 19:13:50 +0800
commitdfa607c1646be82bce5044941b7609c9bb1ccaa3 (patch)
tree3787d005b12090ec965a617a0be42e513898d6b3 /src/alloc.c
parent8fef9a5cd9a16b2f91f2ad4e7edbcc49c3963d42 (diff)
downloademacs-dfa607c1646be82bce5044941b7609c9bb1ccaa3.tar.gz
emacs-dfa607c1646be82bce5044941b7609c9bb1ccaa3.zip
Fix build on glibc <2.10
* src/alloc.c (Fmalloc_info): Only enable if glibc supports malloc_info. (syms_of_alloc): Likewise.
Diffstat (limited to 'src/alloc.c')
-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
7385 make_int (strings_consed)); 7385 make_int (strings_consed));
7386} 7386}
7387 7387
7388#if defined GNU_LINUX && defined __GLIBC__ 7388#if defined GNU_LINUX && defined __GLIBC__ && \
7389 (__GLIBC__ > 2 || __GLIBC_MINOR__ >= 10)
7389DEFUN ("malloc-info", Fmalloc_info, Smalloc_info, 0, 0, "", 7390DEFUN ("malloc-info", Fmalloc_info, Smalloc_info, 0, 0, "",
7390 doc: /* Report malloc information to stderr. 7391 doc: /* Report malloc information to stderr.
7391This function outputs to stderr an XML-formatted 7392This function outputs to stderr an XML-formatted
@@ -7745,7 +7746,9 @@ N should be nonnegative. */);
7745 defsubr (&Sgarbage_collect_maybe); 7746 defsubr (&Sgarbage_collect_maybe);
7746 defsubr (&Smemory_info); 7747 defsubr (&Smemory_info);
7747 defsubr (&Smemory_use_counts); 7748 defsubr (&Smemory_use_counts);
7748#if defined GNU_LINUX && defined __GLIBC__ 7749#if defined GNU_LINUX && defined __GLIBC__ && \
7750 (__GLIBC__ > 2 || __GLIBC_MINOR__ >= 10)
7751
7749 defsubr (&Smalloc_info); 7752 defsubr (&Smalloc_info);
7750#endif 7753#endif
7751 defsubr (&Ssuspicious_object); 7754 defsubr (&Ssuspicious_object);