Fix ranlib to work with odd-length extended names.

Submitted by: Jim Leppek <jleppek@harris.com>
This commit is contained in:
Andrey A. Chernov 1995-11-01 08:06:01 +00:00
parent f2d642f969
commit 74e1c9782c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11996

View File

@ -103,7 +103,7 @@ build()
/* Copy the saved objects into the archive. */
size = lseek(tfd, (off_t)0, SEEK_CUR);
(void)lseek(tfd, (off_t)0, SEEK_SET);
SETCF(tfd, tname, afd, archive, RPAD|WPAD);
SETCF(tfd, tname, afd, archive, WPAD);
copy_ar(&cf, size);
(void)ftruncate(afd, lseek(afd, (off_t)0, SEEK_CUR));
(void)close(tfd);