Forward declare mallocx in isc/mem.h

cmocka.h and jemalloc.h/malloc_np.h has conflicting macro definitions.
While fixing them with push_macro for only malloc is done below, we only
need the non-standard mallocx interface which is easy to just define by
ourselves.

(cherry picked from commit 197de93bdc)
This commit is contained in:
Aydın Mercan 2024-01-04 10:40:54 +03:00 committed by Ondřej Surý
parent f82f4d1d77
commit afb0b3971c
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41

View file

@ -190,7 +190,13 @@ extern unsigned int isc_mem_defaultflags;
* for more information.
*/
#if HAVE_JEMALLOC
#include <jemalloc/jemalloc.h>
/*
* cmocka.h has confliction definitions with the jemalloc header but we only
* need the mallocx symbol from jemalloc.
*/
void *
mallocx(size_t size, int flags);
extern volatile void *isc__mem_malloc;