The glibc API 'mallinfo' is deprecated and the new 'mallinfo2'
should be used from glibc 2.33 (2021-02-01).
Throw an error when '--enable-malloc-logging' is used on systems
that compile without glibc.
Detect the glibc version and, for backward compatibility, define
'mallinfo2' as the old 'mallinfo'. Define a macro for the format
of 'fordblks'.
Change-Id: I68bff7b1b58f0ec2669db0b911f19c1c5a26ed30 Reported-by: Steven J. Hill <steven.hill@konsulko.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8589 Tested-by: jenkins