Skip to content

Commit

Permalink
Fix MODE=tiny build
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Dec 17, 2024
1 parent c8c81af commit 906bd06
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libc/mem/calloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -31,4 +33,3 @@
void *calloc(size_t n, size_t itemsize) {
return dlcalloc(n, itemsize);
}

2 changes: 2 additions & 0 deletions libc/mem/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "libc/mem/mem.h"
#include "third_party/dlmalloc/dlmalloc.h"

__static_yoink("free");

/**
* Allocates uninitialized memory.
*
Expand Down
3 changes: 2 additions & 1 deletion libc/mem/memalign.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "libc/mem/mem.h"
#include "third_party/dlmalloc/dlmalloc.h"

__static_yoink("free");

/**
* Allocates aligned memory.
*
Expand All @@ -35,4 +37,3 @@
void *memalign(size_t align, size_t bytes) {
return dlmemalign(align, bytes);
}

3 changes: 2 additions & 1 deletion libc/mem/realloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "libc/mem/mem.h"
#include "third_party/dlmalloc/dlmalloc.h"

__static_yoink("free");

/**
* Allocates / resizes / frees memory, e.g.
*
Expand Down Expand Up @@ -60,4 +62,3 @@
void *realloc(void *p, size_t n) {
return dlrealloc(p, n);
}

2 changes: 2 additions & 0 deletions test/libc/stdio/fgetwc_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 906bd06

Please sign in to comment.