- handle no mmap for munmap
[rsync/rsync.git] / util.c
diff --git a/util.c b/util.c
index 22ca8c2..537ec0b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -91,8 +91,10 @@ char *map_ptr(char *buf,off_t offset,int len)
 
 void unmap_file(char *buf,off_t len)
 {
+#ifdef HAVE_MMAP
   if (len > 0 && buf)
     munmap(buf,len);
+#endif
   map_fd = -1;
   map_size = 0;
   p_len = 0;