Avoid conflicts with libraries defining their own xmalloc by defining
xmalloc to bird_xmalloc internally.
This commit is contained in:
parent
2560c8860e
commit
3ee2310c5d
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue