Browse code

fmap, scanners.c: win32 fixes

aCaB authored on 2009/10/13 06:32:27
Showing 2 changed files
... ...
@@ -27,7 +27,9 @@
27 27
 #include <sys/types.h>
28 28
 #include <sys/stat.h>
29 29
 #include <string.h>
30
+#ifdef HAVE_UNISTD_H
30 31
 #include <unistd.h>
32
+#endif
31 33
 #if HAVE_MMAP
32 34
 #ifdef HAVE_SYS_MMAN_H
33 35
 #include <sys/mman.h>
... ...
@@ -123,7 +125,7 @@ fmap_t *fmap(int fd, off_t offset, size_t len) {
123 123
     } else {
124 124
 	dumb = 0;
125 125
 #if HAVE_MADVISE
126
-	madvise(m, mapsz, MADV_RANDOM|MADV_DONTFORK);
126
+	madvise((void *)m, mapsz, MADV_RANDOM|MADV_DONTFORK);
127 127
 #endif /* madvise */
128 128
     }
129 129
 #else /* ! HAVE_MMAP */
... ...
@@ -22,7 +22,9 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#ifndef _WIN32
25 26
 #include <sys/time.h>
27
+#endif
26 28
 #include <stdio.h>
27 29
 #include <string.h>
28 30
 #include <stdlib.h>
... ...
@@ -71,7 +73,7 @@
71 71
 #include "cab.h"
72 72
 #include "rtf.h"
73 73
 #include "unarj.h"
74
-#include "nulsft.h"
74
+#include "nsis/nulsft.h"
75 75
 #include "autoit.h"
76 76
 #include "textnorm.h"
77 77
 #include <zlib.h>