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:
parent
021c66f70f
commit
770ca66a70
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user