COMP: fix build on HPUX, snprintf apparently doesn't work there
Alex
This commit is contained in:
parent
96a93400c5
commit
1dde4ab36c
@ -369,15 +369,14 @@ static int put_arobj(CF *cfp, struct stat *sb)
|
|||||||
gid = USHRT_MAX;
|
gid = USHRT_MAX;
|
||||||
}
|
}
|
||||||
if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
|
if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
|
||||||
(void)snprintf(ar_hb, sizeof(ar_hb),
|
(void)sprintf(ar_hb, HDR1, AR_EFMT1, lname,
|
||||||
HDR1, AR_EFMT1, lname,
|
(long int)sb->st_mtime, uid, gid, sb->st_mode,
|
||||||
(long int)sb->st_mtime, uid, gid, sb->st_mode,
|
(long long)sb->st_size + lname, ARFMAG);
|
||||||
sb->st_size + lname, ARFMAG);
|
|
||||||
else {
|
else {
|
||||||
lname = 0;
|
lname = 0;
|
||||||
(void)snprintf(ar_hb, sizeof(ar_hb),
|
(void)sprintf(ar_hb, HDR2, name,
|
||||||
HDR2, name, (long int)sb->st_mtime,
|
(long int)sb->st_mtime, uid, gid, sb->st_mode,
|
||||||
uid, gid, sb->st_mode, sb->st_size, ARFMAG);
|
(long long)sb->st_size, ARFMAG);
|
||||||
}
|
}
|
||||||
off_t size = sb->st_size;
|
off_t size = sb->st_size;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user