Skip to content

Commit 906bd06

Browse files
committed
Fix MODE=tiny build
1 parent c8c81af commit 906bd06

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

libc/mem/calloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "libc/mem/mem.h"
2020
#include "third_party/dlmalloc/dlmalloc.h"
2121

22+
__static_yoink("free");
23+
2224
/**
2325
* Allocates n * itemsize bytes, initialized to zero.
2426
*
@@ -31,4 +33,3 @@
3133
void *calloc(size_t n, size_t itemsize) {
3234
return dlcalloc(n, itemsize);
3335
}
34-

libc/mem/malloc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "libc/mem/mem.h"
2020
#include "third_party/dlmalloc/dlmalloc.h"
2121

22+
__static_yoink("free");
23+
2224
/**
2325
* Allocates uninitialized memory.
2426
*

libc/mem/memalign.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "libc/mem/mem.h"
2020
#include "third_party/dlmalloc/dlmalloc.h"
2121

22+
__static_yoink("free");
23+
2224
/**
2325
* Allocates aligned memory.
2426
*
@@ -35,4 +37,3 @@
3537
void *memalign(size_t align, size_t bytes) {
3638
return dlmemalign(align, bytes);
3739
}
38-

libc/mem/realloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "libc/mem/mem.h"
2020
#include "third_party/dlmalloc/dlmalloc.h"
2121

22+
__static_yoink("free");
23+
2224
/**
2325
* Allocates / resizes / frees memory, e.g.
2426
*
@@ -60,4 +62,3 @@
6062
void *realloc(void *p, size_t n) {
6163
return dlrealloc(p, n);
6264
}
63-

test/libc/stdio/fgetwc_test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
1717
│ PERFORMANCE OF THIS SOFTWARE. │
1818
╚─────────────────────────────────────────────────────────────────────────────*/
19+
#include "libc/intrin/weaken.h"
20+
#include "libc/mem/mem.h"
1921
#include "libc/stdio/internal.h"
2022
#include "libc/testlib/testlib.h"
2123

0 commit comments

Comments
 (0)