From 5fdac838ae86f536d12c0b5e7631172d049bd556 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 17 Jan 2019 14:17:38 +0100 Subject: Add a fake mremap() to our mman.h/c mremap() is allowed to fail if it cannot find the required memory. Ours always fails. Change-Id: I5a0e9afe94158fbc5f66cc7f65fd716ccc002b3d Reviewed-by: Christian Kandeler --- libgnu/mman_win32.c | 11 +++++++++++ libgnu/sys_mman.win32.h | 1 + 2 files changed, 12 insertions(+) diff --git a/libgnu/mman_win32.c b/libgnu/mman_win32.c index 78966c2e..98ea7c24 100644 --- a/libgnu/mman_win32.c +++ b/libgnu/mman_win32.c @@ -138,3 +138,14 @@ int mprotect(void *addr, size_t len, int prot) errno = EACCES; return -1; } + +void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ...) +{ + (void) old_address; + (void) old_size; + (void) new_size; + (void) flags; + errno = ENOMEM; + return MAP_FAILED; +} + diff --git a/libgnu/sys_mman.win32.h b/libgnu/sys_mman.win32.h index 9ad54af5..7c4eef0f 100644 --- a/libgnu/sys_mman.win32.h +++ b/libgnu/sys_mman.win32.h @@ -59,5 +59,6 @@ int munmap(void *addr, size_t length); int msync(void *addr, size_t length, int flags); int posix_madvise(void *addr, size_t len, int advice); int mprotect(void *addr, size_t len, int prot); +void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ...); #endif // MMAN_H -- cgit v1.2.3