add compile-time switch which disables mmap for pack files
diff --git a/lib/pack.c b/lib/pack.c
index c285d19..856b660 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -584,10 +584,12 @@ cache_pack(struct got_pack **packp, const char *path_packfile,
if (err)
goto done;
+#ifndef GOT_PACK_NO_MMAP
pack->map = mmap(NULL, pack->filesize, PROT_READ, MAP_PRIVATE,
pack->fd, 0);
if (pack->map == MAP_FAILED)
pack->map = NULL; /* fall back to read(2) */
+#endif
done:
if (err) {
if (pack) {