mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: Fix parser FTBS due to reallocarray
Older glibcs and alternate libcs don't have reallocarray() So define it if not defined by libc. Fixes: #3 of https://gitlab.com/apparmor/apparmor/-/issues/109 MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/639 Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <steve.beattie@canonical.com>
This commit is contained in:
@@ -52,6 +52,13 @@
|
||||
#endif
|
||||
#define NPDEBUG(fmt, args...) /* Do nothing */
|
||||
|
||||
#ifndef HAVE_REALLOCARRAY
|
||||
void *reallocarray(void *ptr, size_t nmemb, size_t size)
|
||||
{
|
||||
return realloc(ptr, nmemb * size);
|
||||
}
|
||||
#endif
|
||||
|
||||
int is_blacklisted(const char *name, const char *path)
|
||||
{
|
||||
int retval = _aa_is_blacklisted(name);
|
||||
|
Reference in New Issue
Block a user