From dfb4915f0adce6a0ed284fea31ce51ded79f7bbf Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 27 Sep 2012 01:46:12 +0000 Subject: [PATCH] add cast so the file compiles in c++ mode too --- mmap/mmap_private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmap/mmap_private.c b/mmap/mmap_private.c index 3d6e33c..391f2bf 100644 --- a/mmap/mmap_private.c +++ b/mmap/mmap_private.c @@ -28,7 +28,7 @@ char* mmap_private(const char* filename,size_t * filesize) { char *map; if (fd>=0) { *filesize=lseek(fd,0,SEEK_END); - map=mmap(0,*filesize,PROT_READ|PROT_WRITE,MAP_PRIVATE,fd,0); + map=(char*)mmap(0,*filesize,PROT_READ|PROT_WRITE,MAP_PRIVATE,fd,0); if (map==(char*)-1) map=0; close(fd);