mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-18 08:02:08 +00:00
Due to a different signedness of char type on arm and ppc, xar wouldn't start at all on these platforms. A weird (compiler?) bug caused a completely random offset to be taken obviously failing any checksums. Fixes: https://bugs.gentoo.org/650024 Closes: https://bugs.gentoo.org/650024 Package-Manager: Portage-2.3.19, Repoman-2.3.6
23 lines
589 B
Diff
23 lines
589 B
Diff
--- a/lib/archive.c
|
|
+++ b/lib/archive.c
|
|
@@ -387,7 +387,8 @@
|
|
return NULL;
|
|
}
|
|
|
|
- XAR(ret)->heap_offset = xar_get_heap_offset(ret) + offset;
|
|
+ XAR(ret)->heap_offset =
|
|
+ XAR(ret)->toc_count + sizeof(xar_header_t) + offset;
|
|
if( lseek(XAR(ret)->fd, XAR(ret)->heap_offset, SEEK_SET) == -1 ) {
|
|
xar_close(ret);
|
|
return NULL;
|
|
--- a/src/xar.c
|
|
+++ a/src/xar.c
|
|
@@ -783,7 +783,7 @@
|
|
int main(int argc, char *argv[]) {
|
|
int ret;
|
|
char *filename = NULL;
|
|
- char command = 0, c;
|
|
+ signed char command = 0, c;
|
|
char **args;
|
|
const char *tocfile = NULL;
|
|
int arglen, i, err;
|