Index: base/file_util_posix.cc |
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc |
index d9cbe0945e75fe3be45dd380affcf445c0051a25..9db41fe95b196c20e7541f66c9bf23809ade696d 100644 |
--- a/base/file_util_posix.cc |
+++ b/base/file_util_posix.cc |
@@ -14,6 +14,7 @@ |
#include <string.h> |
#include <sys/errno.h> |
#include <sys/mman.h> |
+#include <sys/param.h> |
Lei Zhang
2010/05/12 18:53:32
nit: My Linux man page says this should be <limits
Sam Kerner (Chrome)
2010/05/12 20:02:57
I used the mac man page, then tested on linux...
|
#include <sys/stat.h> |
#include <sys/time.h> |
#include <sys/types.h> |
@@ -735,6 +736,15 @@ bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info, |
return find_info.stat.st_mtime >= cutoff_time.ToTimeT(); |
} |
+bool RealPath(const FilePath& path, FilePath* real_path) { |
+ FilePath::CharType buf[PATH_MAX]; |
+ if (!realpath(path.value().c_str(), buf)) |
+ return false; |
+ |
+ *real_path = FilePath(buf); |
+ return true; |
+} |
+ |
#if !defined(OS_MACOSX) |
bool GetTempDir(FilePath* path) { |
const char* tmp = getenv("TMPDIR"); |