summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util.c b/util.c
index ad2a1b8..5759d8c 100644
--- a/util.c
+++ b/util.c
@@ -28,9 +28,14 @@
#include <sys/types.h>
#include <sys/stat.h>
+
#ifdef USE_MMAP
#include <sys/mman.h>
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *) -1)
+#endif /* !MAP_FAILED */
#endif /* USE MMAP */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>