diff options
author | Martin Pärtel <lagitus@mbnet.fi> | 2010-05-14 21:00:15 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-05-14 21:00:15 -0700 |
commit | 8522c314da7537169996476fe5ba411f720a09fe (patch) | |
tree | 04a247d7fe887ee2cb2d89c048e184a46e3a0414 /include.c | |
parent | c976a7fc7c21772c00de9e61178cf467c6a10b57 (diff) |
Bug 28045 - makedepend fails on directory named like an include file
<https://bugs.freedesktop.org/show_bug.cgi?id=28045>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'include.c')
-rw-r--r-- | include.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -264,7 +264,7 @@ inc_path(const char *file, const char *include, int type) if ((type == INCLUDEDOT) || (type == INCLUDENEXTDOT) || (*include == '/')) { - if (stat(include, &st) == 0) + if (stat(include, &st) == 0 && !S_ISDIR(st.st_mode)) return newinclude(include, include); if (show_where_not) warning1("\tnot in %s\n", include); @@ -286,7 +286,7 @@ inc_path(const char *file, const char *include, int type) strcpy(path + (p-file) + 1, include); } remove_dotdot(path); - if (stat(path, &st) == 0) + if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) return newinclude(path, include); if (show_where_not) warning1("\tnot in %s\n", path); @@ -304,7 +304,7 @@ inc_path(const char *file, const char *include, int type) for (; *pp; pp++) { sprintf(path, "%s/%s", *pp, include); remove_dotdot(path); - if (stat(path, &st) == 0) { + if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) { includedirsnext = pp + 1; return newinclude(path, include); } |