basic/selinux: work around mallinfo deprecation

Latest glibc has deprecated mallinfo(), so it might become unavailable at some point
in the future. There is malloc_info(), but it returns XML, ffs. I think the information
that we get from mallinfo() is quite useful, so let's use mallinfo() if available, and
not otherwise.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-10-12 15:51:39 +02:00
committed by Lennart Poettering
parent d775d8e6f7
commit 4b6f74f5a0
3 changed files with 27 additions and 8 deletions
+4
View File
@@ -93,6 +93,10 @@
#endif
/* Temporarily disable some warnings */
#define DISABLE_WARNING_DEPRECATED_DECLARATIONS \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define DISABLE_WARNING_FORMAT_NONLITERAL \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")