emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dfa607c164 1/2: Fix build on glibc <2.10


From: Po Lu
Subject: master dfa607c164 1/2: Fix build on glibc <2.10
Date: Tue, 22 Feb 2022 06:20:04 -0500 (EST)

branch: master
commit dfa607c1646be82bce5044941b7609c9bb1ccaa3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix build on glibc <2.10
    
    * src/alloc.c (Fmalloc_info): Only enable if glibc supports
    malloc_info.
    (syms_of_alloc): Likewise.
---
 src/alloc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index a3410be7e2..9ed94dc8a1 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]