summaryrefslogtreecommitdiff
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-12-30 05:55:34 +0000
committermidipix <writeonce@midipix.org>2024-12-30 06:17:43 +0000
commite49b91d36c7c3281dcb407bc761ee01a51608fe4 (patch)
treeee0489f9f912721e0df701cb1b60897419c082e1 /src/arbits
parent5f293f0453aa6b03e06cc56b0126024cec847e24 (diff)
downloadslibtool-e49b91d36c7c3281dcb407bc761ee01a51608fe4.tar.bz2
slibtool-e49b91d36c7c3281dcb407bc761ee01a51608fe4.tar.xz
slbt_ar_merge_archives(): properly handle 32-bit pointers vs. 64-bit formats.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_merge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arbits/slbt_archive_merge.c b/src/arbits/slbt_archive_merge.c
index 9068bf6..5ace063 100644
--- a/src/arbits/slbt_archive_merge.c
+++ b/src/arbits/slbt_archive_merge.c
@@ -181,6 +181,7 @@ int slbt_ar_merge_archives(
int64_t onamestrs;
int64_t omemfixup;
int64_t atint;
+ int64_t aroff;
char * base;
unsigned char * ubase;
@@ -592,7 +593,7 @@ int slbt_ar_merge_archives(
if (meminfo->ar_file_header.ar_header_attr & AR_HEADER_ATTR_NAME_REF) {
nwritten = sprintf(
&base[omembers],"/"PPRII64,
- namestr - namebase);
+ (aroff = namestr - namebase));
if (nwritten < 0)
SLBT_SYSTEM_ERROR(dctx,0);