From 74e7fd417e3df253c17d9c2d805afa65cc5b69cd Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 29 Dec 2005 18:25:29 +0000 Subject: [PATCH] This should finally fix the spurious "No such file or directory" errors reported from our build tools under Linux. As it seems Linux does not translate dirent::d_ino for mount points (BeOS and Haiku do), which caused us not to find a mount point entry in its parent directory. Thanks to Vampyre for the hint. Fixes bugs #73 and #76. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15726 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/build/libroot/fs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp index 82a9a1b5ce..cd9f5929b3 100644 --- a/src/build/libroot/fs.cpp +++ b/src/build/libroot/fs.cpp @@ -315,9 +315,11 @@ find_dir_entry(DIR *dir, const char *path, NodeRef ref, string &name, bool skipD if ((!skipDot && strcmp(entry->d_name, ".") == 0) || strcmp(entry->d_name, "..") == 0) { // skip "." and ".." - } else if (entry->d_ino == ref.node) { + } else /*if (entry->d_ino == ref.node)*/ { + // Note: Linux doesn't seem to translate dirent::d_ino of + // mount points. Thus we always have to lstat(). // We also need to compare the device, which is generally not - // included in the direct structure. Hence we lstat(). + // included in the dirent structure. Hence we lstat(). string entryPath(path); entryPath += '/'; entryPath += entry->d_name;