Skip to content

Commit caa43a2

Browse files
committed
Windows build fixes.
1 parent f716375 commit caa43a2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ static LOWFAT_NOINLINE void lowfat_warning(const char *format, ...);
5555
static LOWFAT_DATA uint8_t *lowfat_seed = NULL;
5656
static LOWFAT_DATA size_t lowfat_seed_pos = LOWFAT_PAGE_SIZE;
5757
static LOWFAT_DATA bool lowfat_malloc_inited = false;
58+
#ifndef LOWFAT_WINDOWS
5859
static LOWFAT_DATA char **lowfat_envp = NULL;
60+
#endif
5961

6062
#ifdef LOWFAT_WINDOWS
6163
#include "lowfat_windows.c"

llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_malloc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ static void *lowfat_fallback_malloc(size_t size)
6363
#endif /* LOWFAT_NO_STD_MALLOC_FALLBACK */
6464
}
6565

66+
#ifndef LOWFAT_WINDOWS
6667
#define lowfat_fallback_free(x) __libc_free(x)
6768
#define lowfat_fallback_realloc(x, y) __libc_realloc((x), (y))
69+
#else
70+
#define lowfat_fallback_free(x) free(x)
71+
#define lowfat_fallback_realloc(x, y) realloc((x), (y))
72+
#endif
6873

6974
/*
7075
* Initialize the lowfat_malloc() state.

0 commit comments

Comments
 (0)