From 1333904fea4865588596450f894dc05e33d4605d Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 22 Aug 2013 23:42:46 +0000 Subject: [PATCH] make first argument to mmap_unmap const --- mmap.h | 2 +- mmap/mmap_unmap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mmap.h b/mmap.h index bd95d16..53ea10e 100644 --- a/mmap.h +++ b/mmap.h @@ -22,7 +22,7 @@ char* mmap_private(const char *filename,size_t* filesize); char* mmap_shared(const char *filename,size_t* filesize); /* unmap a mapped region */ -int mmap_unmap(char* mapped,size_t maplen); +int mmap_unmap(const char* mapped,size_t maplen); #ifdef __cplusplus } diff --git a/mmap/mmap_unmap.c b/mmap/mmap_unmap.c index dd0030f..994e486 100644 --- a/mmap/mmap_unmap.c +++ b/mmap/mmap_unmap.c @@ -8,11 +8,11 @@ #include "open.h" #include "mmap.h" -int mmap_unmap(char* mapped,size_t maplen) { +int mmap_unmap(const char* mapped,size_t maplen) { #ifdef __MINGW32__ (void)maplen; return UnmapViewOfFile(mapped)?0:-1; #else - return munmap(mapped,maplen); + return munmap((char*)mapped,maplen); #endif }