From 170ec5ba796754f7dea7e910162e116a1aabdaff Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 28 Aug 2015 18:14:00 +0200 Subject: [PATCH] usr.bin/ar: Fix deterministic mode when running as ranlib Previously -D had no effect and ranlib defaulted to being non-deterministic despite the man page saying otherwise. Obtained from: ElectroBSD --- usr.bin/ar/ar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index b7c1de6..e00980e 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -144,6 +144,9 @@ main(int argc, char **argv) if (*argv == NULL) ranlib_usage(); + /* Enable determinstic mode unless -U is set. */ + if (Uflag == 0) + bsdar->options |= AR_D; bsdar->options |= AR_S; for (;(bsdar->filename = *argv++) != NULL;) ar_mode_s(bsdar); -- 2.4.6