summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-05 18:44:21 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-07 21:25:36 -0500
commitb1c158c9654d033dfe39bb042ec5d4d39a272298 (patch)
treee1691f52b89183a5c3d3e17447fe20513c9f91ad /rts
parent6b7d7e1c484cebe01014f4fa67abb48cacdd54f9 (diff)
downloadhaskell-b1c158c9654d033dfe39bb042ec5d4d39a272298.tar.gz
rts: Fix m32 allocator build on Windows
An inconsistency in the name of m32_allocator_flush caused the build to fail with a missing prototype error.
Diffstat (limited to 'rts')
-rw-r--r--rts/linker/M32Alloc.c10
-rw-r--r--rts/linker/M32Alloc.h2
-rw-r--r--rts/linker/PEi386.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c
index cb02ed25d4..dbba711df4 100644
--- a/rts/linker/M32Alloc.c
+++ b/rts/linker/M32Alloc.c
@@ -454,24 +454,26 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment)
// See the note titled "Compile Time Trickery" at the top of this file.
m32_allocator *
-m32_allocator_new(bool executable)
+m32_allocator_new(bool executable STG_UNUSED)
{
barf("%s: RTS_LINKER_USE_MMAP is %d", __func__, RTS_LINKER_USE_MMAP);
}
-void m32_allocator_free(m32_allocator *alloc)
+void m32_allocator_free(m32_allocator *alloc STG_UNUSED)
{
barf("%s: RTS_LINKER_USE_MMAP is %d", __func__, RTS_LINKER_USE_MMAP);
}
void
-m32_flush(void)
+m32_allocator_flush(m32_allocator *alloc STG_UNUSED)
{
barf("%s: RTS_LINKER_USE_MMAP is %d", __func__, RTS_LINKER_USE_MMAP);
}
void *
-m32_alloc(size_t size STG_UNUSED, size_t alignment STG_UNUSED)
+m32_alloc(m32_allocator *alloc STG_UNUSED,
+ size_t size STG_UNUSED,
+ size_t alignment STG_UNUSED)
{
barf("%s: RTS_LINKER_USE_MMAP is %d", __func__, RTS_LINKER_USE_MMAP);
}
diff --git a/rts/linker/M32Alloc.h b/rts/linker/M32Alloc.h
index f5ab757b27..892588082f 100644
--- a/rts/linker/M32Alloc.h
+++ b/rts/linker/M32Alloc.h
@@ -8,7 +8,7 @@
#pragma once
-#if RTS_LINKER_USE_MMAP
+#if RTS_LINKER_USE_MMAP == 1
#include <fcntl.h>
#include <sys/mman.h>
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c
index 788b239d9f..ce503bf149 100644
--- a/rts/linker/PEi386.c
+++ b/rts/linker/PEi386.c
@@ -1826,6 +1826,8 @@ makeSymbolExtra_PEi386( ObjectCode* oc, uint64_t index, size_t s, char* symbol )
return (size_t)extra->jumpIsland;
}
+void ocProtectExtras(ObjectCode* oc STG_UNUSED) { }
+
#endif /* x86_64_HOST_ARCH */
bool