mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Avoid conflicts with libraries defining their own xmalloc by defining
xmalloc to bird_xmalloc internally.
This commit is contained in:
parent
2560c8860e
commit
3ee2310c5d
@ -80,6 +80,12 @@ void sl_free(slab *, void *);
|
|||||||
#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size)
|
#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size)
|
||||||
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
|
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
|
||||||
#else
|
#else
|
||||||
|
/*
|
||||||
|
* Unfortunately, several libraries we might want to link to define
|
||||||
|
* their own xmalloc and we don't want to interfere with them, hence
|
||||||
|
* the renaming.
|
||||||
|
*/
|
||||||
|
#define xmalloc bird_xmalloc
|
||||||
void *xmalloc(unsigned);
|
void *xmalloc(unsigned);
|
||||||
#define xfree(x) free(x)
|
#define xfree(x) free(x)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user