libs/lmo: jffs2 does not support mmap() with MAP_SHARED, use MAP_PRIVATE instead...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 29 Jul 2009 03:28:14 +0000 (03:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 29 Jul 2009 03:28:14 +0000 (03:28 +0000)
libs/lmo/src/lmo_core.c

index b3cb7c09892119b6cc5e787414a2b2bda597336a..0754d0dc532ad790ef6eb899086ba07112d7bf0f 100644 (file)
@@ -132,7 +132,7 @@ lmo_archive_t * lmo_open(const char *file)
                        goto cleanup;
                }
 
-               if( (ar->mmap = mmap(NULL, ar->length, PROT_READ, MAP_SHARED, ar->fd, 0)) == MAP_FAILED )
+               if( (ar->mmap = mmap(NULL, ar->length, PROT_READ, MAP_PRIVATE, ar->fd, 0)) == MAP_FAILED )
                {
                        error("Failed to memory map archive contents", 1);
                        goto cleanup;