Index: mmapio.c
===================================================================
--- mmapio.c	(revision 194272)
+++ mmapio.c	(working copy)
@@ -40,6 +40,10 @@
 #include "backtrace.h"
 #include "internal.h"
 
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
 /* This file implements file views and memory allocation when mmap is
    available.  */
 
