aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-22 15:21:02 +0100
committerRon Yorston <rmy@pobox.com>2017-08-22 15:21:02 +0100
commitbcacae6da4e772f208ef2026fae5faaac9048411 (patch)
treeb70338e940e09cf73fa4fc8679ce1212d6dec53c /archival
parentce9af1cc5ea23f754587448cf35b5120c77bfeef (diff)
downloadbusybox-w32-bcacae6da4e772f208ef2026fae5faaac9048411.tar.gz
busybox-w32-bcacae6da4e772f208ef2026fae5faaac9048411.tar.bz2
busybox-w32-bcacae6da4e772f208ef2026fae5faaac9048411.zip
Post-merge fixes
- Update default configurations. - Changes required for rpm2cpio to compile
Diffstat (limited to 'archival')
-rw-r--r--archival/rpm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/archival/rpm.c b/archival/rpm.c
index 790eeb59d..700f90979 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -140,6 +140,7 @@ static int rpm_gettags(const char *filename)
140 } 140 }
141 G.mytags = tags; 141 G.mytags = tags;
142 142
143#if !ENABLE_PLATFORM_MINGW32
143 /* Map the store */ 144 /* Map the store */
144 storepos = (storepos + G.pagesize) & -(int)G.pagesize; 145 storepos = (storepos + G.pagesize) & -(int)G.pagesize;
145 /* remember size for munmap */ 146 /* remember size for munmap */
@@ -148,6 +149,14 @@ static int rpm_gettags(const char *filename)
148 G.map = mmap(0, storepos, PROT_READ, MAP_PRIVATE, fd, 0); 149 G.map = mmap(0, storepos, PROT_READ, MAP_PRIVATE, fd, 0);
149 if (G.map == MAP_FAILED) 150 if (G.map == MAP_FAILED)
150 bb_perror_msg_and_die("mmap '%s'", filename); 151 bb_perror_msg_and_die("mmap '%s'", filename);
152#else
153# undef munmap
154# define munmap(p, l) free(p)
155 /* Allocate memory for the store */
156 G.map = xmalloc(storepos);
157 xlseek(fd, 0, SEEK_SET);
158 full_read(fd, G.map, storepos);
159#endif
151 160
152 return fd; 161 return fd;
153} 162}