ar: fix deterministic mode when running as ranlib

This was broken by r286024.

PR:		202741
Submitted by:	fk@fabiankeil.de
Obtained from:	ElectroBSD
This commit is contained in:
Ed Maste 2015-08-31 12:28:13 +00:00
parent a465d49ffa
commit a64a36e280

View File

@ -144,6 +144,9 @@ main(int argc, char **argv)
if (*argv == NULL) if (*argv == NULL)
ranlib_usage(); ranlib_usage();
/* Enable determinstic mode unless -U is set. */
if (Uflag == 0)
bsdar->options |= AR_D;
bsdar->options |= AR_S; bsdar->options |= AR_S;
for (;(bsdar->filename = *argv++) != NULL;) for (;(bsdar->filename = *argv++) != NULL;)
ar_mode_s(bsdar); ar_mode_s(bsdar);