In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so

rpcgen will search the current PATH for the preprocessor.  This makes it
possible to run a preprocessor built during the cross-tools stage of
buildworld.

MFC after:	1 week
This commit is contained in:
Dimitry Andric 2012-02-06 21:35:11 +00:00
parent ab4343580d
commit 005576f63d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231101
1 changed files with 2 additions and 8 deletions

View File

@ -290,7 +290,6 @@ prepend_cpp(void)
int idx = 1;
const char *var;
char *dupvar, *s, *t;
struct stat buf;
if (CPP != NULL)
insarg(0, CPP);
@ -306,11 +305,6 @@ prepend_cpp(void)
free(dupvar);
}
if (stat(arglist[0], &buf) < 0) {
warnx("cannot find C preprocessor: %s", arglist[0]);
crash();
}
insarg(idx, CPPFLAGS);
}
@ -334,8 +328,8 @@ open_input(const char *infile, const char *define)
(void) close(1);
(void) dup2(pd[1], 1);
(void) close(pd[0]);
execv(arglist[0], arglist);
err(1, "execv");
execvp(arglist[0], arglist);
err(1, "execvp %s", arglist[0]);
case -1:
err(1, "fork");
}