Path_Expand() expects its first argument to be writeable so put the

default system directory into a writeable character array before passing
it to Path_Expand().

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (7.210)
This commit is contained in:
Hartmut Brandt 2005-05-10 14:23:31 +00:00
parent 2046fd5f68
commit 824060d705

View File

@ -862,8 +862,9 @@ main(int argc, char **argv)
/* Path of sys.mk */
Lst sysMkPath = Lst_Initializer(sysMkPath);
LstNode *ln;
char defsysmk[] = PATH_DEFSYSMK;
Path_Expand(PATH_DEFSYSMK, &sysIncPath, &sysMkPath);
Path_Expand(defsysmk, &sysIncPath, &sysMkPath);
if (Lst_IsEmpty(&sysMkPath))
Fatal("make: no system rules (%s).", PATH_DEFSYSMK);
LST_FOREACH(ln, &sysMkPath) {