mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +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 xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
|
||||
#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);
|
||||
#define xfree(x) free(x)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user