mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
mallinfo-util: assume mallinfo() exists
The check existed for musl. Let's remove it, as we explicitly request glibc. While removing the check, this also drops generic_mallinfo, introduces a tiny converter from struct mallinfo to struct mallinfo2 if mallinfo2() does not exist, and renames mallinfo-util.h to malloc.h. With this change, we can drop many ifdefs and casts in .c files.
This commit is contained in:
committed by
Lennart Poettering
parent
17f2b40f22
commit
abb99d3168
@@ -588,7 +588,6 @@ foreach ident : [
|
||||
['get_mempolicy', '''#include <sys/syscall.h>'''], # declared at numaif.h provided by libnuma, which we do not use
|
||||
['posix_getdents', '''#include <dirent.h>'''], # glibc does not implement it, but musl does
|
||||
['strerrorname_np', '''#include <string.h>'''], # since glibc-2.32
|
||||
['mallinfo', '''#include <malloc.h>'''], # deprecated since glibc-2.33, but check it for musl
|
||||
['mallinfo2', '''#include <malloc.h>'''], # since glibc-2.33
|
||||
['execveat', '''#include <unistd.h>'''], # since glibc-2.34
|
||||
['close_range', '''#include <unistd.h>'''], # since glibc-2.34
|
||||
|
||||
Reference in New Issue
Block a user