diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-17 14:17:38 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-18 09:46:14 +0000 |
commit | 5fdac838ae86f536d12c0b5e7631172d049bd556 (patch) | |
tree | ddae099105616eb3f20151bd6da867a47bdf903d | |
parent | 5802241ec0c92081a8c09125bfdb1e52f56bebb8 (diff) |
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 <christian.kandeler@qt.io>
-rw-r--r-- | libgnu/mman_win32.c | 11 | ||||
-rw-r--r-- | libgnu/sys_mman.win32.h | 1 |
2 files changed, 12 insertions, 0 deletions
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 |