MINOR: pools: use mallinfo2() when available instead of mallinfo()
authorWilly Tarreau <w@1wt.eu>
Thu, 16 Sep 2021 07:18:21 +0000 (09:18 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Sep 2021 14:57:07 +0000 (16:57 +0200)
commit991d740cbe82f9df14a199270d30c5b2375923e8
tree0824ad1586ab063e5ff1bf508091873d79d76089
parent0c90be254606b220e486be1051fb5f4772c64cf3
MINOR: pools: use mallinfo2() when available instead of mallinfo()

Ilya reported in issue #1391 a build warning on Fedora about mallinfo()
being deprecated in favor of mallinfo2() since glibc-2.33. Let's add
support for it. This should be backported where the following commit is
also backported: 157e39303 ("MINOR: pools: automatically disable
malloc_trim() with external allocators").

(cherry picked from commit c2afb860f297eb82039d821bd25bdd3cf66abe28)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 3bf75694c2ba89c1b705ce94b5543aa30fccf4a7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/compat.h
src/pool.c