Support compiling without mmap functions
[pcsx_rearmed.git] / libpcsxcore / memmap.h
index 262cd7c..da1d0e1 100644 (file)
@@ -34,6 +34,9 @@
 #include <_mingw.h>
 #endif
 
+#endif //_WIN32
+
+#if defined(_WIN32) || !HAVE_MMAP
 #include <sys/types.h>
 
 #ifdef __cplusplus
@@ -60,12 +63,14 @@ extern "C" {
 #define MS_SYNC         2
 #define MS_INVALIDATE   4
 
+#ifdef _WIN32
 void*   mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off);
 int     munmap(void *addr, size_t len);
 int     mprotect(void *addr, size_t len, int prot);
 int     msync(void *addr, size_t len, int flags);
 int     mlock(const void *addr, size_t len);
 int     munlock(const void *addr, size_t len);
+#endif
 
 #ifdef __cplusplus
 };