Use mallinfo2() if available

mallinfo() is deprecated because it uses `int` for the members of the
returned struct, whereas mallinfo2() uses `size_t`.  It's available
since glibc 2.33.
This commit is contained in:
Tobias Brunner
2022-04-25 14:16:20 +02:00
parent 8ce4105fca
commit c9d471091f
4 changed files with 30 additions and 13 deletions
+1 -1
View File
@@ -668,7 +668,7 @@ AC_CHECK_FUNC(
]
)
AC_CHECK_FUNCS(prctl mallinfo getpass closefrom getpwnam_r getgrnam_r getpwuid_r chown)
AC_CHECK_FUNCS(prctl mallinfo mallinfo2 getpass closefrom getpwnam_r getgrnam_r getpwuid_r chown)
AC_CHECK_FUNCS(fmemopen funopen mmap memrchr setlinebuf strptime dirfd sigwaitinfo explicit_bzero)
AC_CHECK_FUNC([syslog], [