need a ifdef around some mmap code
authorAndrew Tridgell <tridge@samba.org>
Fri, 22 May 1998 13:51:26 +0000 (13:51 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 22 May 1998 13:51:26 +0000 (13:51 +0000)
util.c

diff --git a/util.c b/util.c
index efc9daf..b94262f 100644 (file)
--- a/util.c
+++ b/util.c
@@ -69,6 +69,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
        if (len > (map->size-offset))
                len = map->size-offset;
 
+#ifdef HAVE_MMAP
        if (map->map) {
                if (offset >= map->p_offset && 
                    offset+len <= map->p_offset+map->p_len) {
@@ -103,6 +104,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
                        return (map->map + (offset - map->p_offset));
                }
        }
+#endif
 
        if (offset >= map->p_offset && 
            offset+len <= map->p_offset+map->p_len) {