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 b3cb7c0..0754d0d 100644 (file)
@@ -132,7 +132,7 @@ lmo_archive_t * lmo_open(const char *file)
                        goto cleanup;
                }
 
                        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;
                {
                        error("Failed to memory map archive contents", 1);
                        goto cleanup;