From: lzhou Date: Tue, 15 Oct 2024 02:48:13 +0000 (+0800) Subject: fix endless loop in redefined malloc/remalloc functions on system using uClibc X-Git-Tag: 1.0.19~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=616594788b330d9dc67f057621537ab873d7b9c9;p=thirdparty%2Flldpd.git fix endless loop in redefined malloc/remalloc functions on system using uClibc --- diff --git a/src/compat/malloc.c b/src/compat/malloc.c index 0c8bb2c8..b881e080 100644 --- a/src/compat/malloc.c +++ b/src/compat/malloc.c @@ -1,10 +1,10 @@ /* -*- mode: c; c-file-style: "openbsd" -*- */ /* malloc replacement that can allocate 0 byte */ -#undef malloc #include #include #include "compat.h" +#undef malloc /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ diff --git a/src/compat/realloc.c b/src/compat/realloc.c index 4d74064b..1fe4743a 100644 --- a/src/compat/realloc.c +++ b/src/compat/realloc.c @@ -1,10 +1,10 @@ /* -*- mode: c; c-file-style: "openbsd" -*- */ /* realloc replacement that can reallocate 0 byte or NULL pointers*/ -#undef realloc #include #include #include "compat.h" +#undef realloc /* Reallocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */