--- ./ar.c.orig	2005-07-28 17:37:45.000000000 -0700
+++ ./ar.c	2005-10-31 10:04:33.000000000 -0800
@@ -84,7 +84,7 @@
 #include "extern.h"
 #include "stuff/execute.h"
 #include "stuff/unix_standard_mode.h"
-
+#include "stuff/allocate.h"
 CHDR chdr;
 u_int options;
 char *archive, *envtmp, *posarg, *posname;
@@ -276,7 +276,7 @@
 	if(run_ranlib){
 	    /* run ranlib -f or -q on the archive */
 	    reset_execute_list();
-	    add_execute_list("ranlib");
+	    add_execute_list(makestr(BINDIR, "/", RANLIBPROG, NULL));
 	    if(options & AR_S)
 		add_execute_list("-f");
 	    else
