lib:util: prefer mallinfo2() over mallinfo() if available
commitb3146763a45d3a52ae1f669ad1b37155f67a16e6
authorDmitry Antipov <dantipov@cloudlinux.com>
Tue, 7 Feb 2023 15:09:15 +0000 (7 18:09 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Mar 2023 20:38:31 +0000 (9 20:38 +0000)
tree8eda50427e4a2011961d7293fa43311baaf5a684
parentf55a357c6b9387883a7628a1b1083263a10121a6
lib:util: prefer mallinfo2() over mallinfo() if available

Prefer mallinfo2() with 'size_t' fields over deprecated
mallinfo() (with 'int' fields which may wrap around zero
and so be inaccurate on a 64-bit system) and move relevant
checks to lib/util/wscript_configure because mallinfo()
is not used beyond 'samba-util'.

Suggested-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/talloc_report_printf.c
lib/util/wscript_configure
source3/wscript