diff options
Diffstat (limited to 'soltools/mkdepend/include.c')
-rw-r--r-- | soltools/mkdepend/include.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index e277382ecf12..337620c26cd3 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -63,7 +63,7 @@ struct inclist *inc_path(file, include, dot) * then check the exact path provided. */ if (!found && (dot || *include == '/')) { - if (stat(include, &st) == 0) { + if (stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) { ip = newinclude(include, include); found = TRUE; } @@ -87,7 +87,7 @@ struct inclist *inc_path(file, include, dot) strcpy(path + (p-file) + 1, include); } remove_dotdot(path); - if (stat(path, &st) == 0) { + if (stat(path, &st) == 0 && !( st.st_mode & S_IFDIR)) { ip = newinclude(path, include); found = TRUE; } @@ -103,7 +103,7 @@ struct inclist *inc_path(file, include, dot) for (pp = includedirs; *pp; pp++) { sprintf(path, "%s/%s", *pp, include); remove_dotdot(path); - if (stat(path, &st) == 0) { + if (stat(path, &st) == 0 && !(st.st_mode & S_IFDIR)) { ip = newinclude(path, include); found = TRUE; break; |