diff --git a/libc/mem/calloc.c b/libc/mem/calloc.c index df578353c..d70aefd3e 100644 --- a/libc/mem/calloc.c +++ b/libc/mem/calloc.c @@ -19,6 +19,8 @@ #include "libc/mem/mem.h" #include "third_party/dlmalloc/dlmalloc.h" +__static_yoink("free"); + /** * Allocates n * itemsize bytes, initialized to zero. * @@ -31,4 +33,3 @@ void *calloc(size_t n, size_t itemsize) { return dlcalloc(n, itemsize); } - diff --git a/libc/mem/malloc.c b/libc/mem/malloc.c index 043a41aac..0d3793cf9 100644 --- a/libc/mem/malloc.c +++ b/libc/mem/malloc.c @@ -19,6 +19,8 @@ #include "libc/mem/mem.h" #include "third_party/dlmalloc/dlmalloc.h" +__static_yoink("free"); + /** * Allocates uninitialized memory. * diff --git a/libc/mem/memalign.c b/libc/mem/memalign.c index bdf8f9ff7..94129aaba 100644 --- a/libc/mem/memalign.c +++ b/libc/mem/memalign.c @@ -19,6 +19,8 @@ #include "libc/mem/mem.h" #include "third_party/dlmalloc/dlmalloc.h" +__static_yoink("free"); + /** * Allocates aligned memory. * @@ -35,4 +37,3 @@ void *memalign(size_t align, size_t bytes) { return dlmemalign(align, bytes); } - diff --git a/libc/mem/realloc.c b/libc/mem/realloc.c index 6d7451a8e..b9a4fe7b4 100644 --- a/libc/mem/realloc.c +++ b/libc/mem/realloc.c @@ -19,6 +19,8 @@ #include "libc/mem/mem.h" #include "third_party/dlmalloc/dlmalloc.h" +__static_yoink("free"); + /** * Allocates / resizes / frees memory, e.g. * @@ -60,4 +62,3 @@ void *realloc(void *p, size_t n) { return dlrealloc(p, n); } - diff --git a/test/libc/stdio/fgetwc_test.c b/test/libc/stdio/fgetwc_test.c index 1f0729282..4f6bd7ccd 100644 --- a/test/libc/stdio/fgetwc_test.c +++ b/test/libc/stdio/fgetwc_test.c @@ -16,6 +16,8 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/intrin/weaken.h" +#include "libc/mem/mem.h" #include "libc/stdio/internal.h" #include "libc/testlib/testlib.h"