Build fix for systems without futimes/futimens
authorAlp Toker <alp@nuanti.com>
Mon, 30 Jun 2014 18:57:04 +0000 (18:57 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 30 Jun 2014 18:57:04 +0000 (18:57 +0000)
Some versions of Android don't have futimes/futimens and this code wasn't
updated during the recent errc refactoring.

Patch by Luqman Aden!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212055 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/FileSystem.h
lib/Support/Unix/Path.inc

index e56e2b718a757f3ed7d9a78958226c2d3ac369d0..bb26f9a3fa6f868e808a1e2ef7a50af787865ee9 100644 (file)
@@ -510,8 +510,8 @@ inline std::error_code file_size(const Twine &Path, uint64_t &Result) {
 /// @brief Set the file modification and access time.
 ///
 /// @returns errc::success if the file times were successfully set, otherwise a
-///          platform specific error_code or errc::not_supported on platforms
-///          where the functionality isn't available.
+///          platform specific error_code or errc::function_not_supported on
+///          platforms where the functionality isn't available.
 std::error_code setLastModificationAndAccessTime(int FD, TimeValue Time);
 
 /// @brief Is status available?
index c9fae4298689bfef27e8367662cb3bbf8413417c..623547a95ed514218af3a22e75f4bbdd63169ea0 100644 (file)
@@ -468,7 +468,7 @@ std::error_code setLastModificationAndAccessTime(int FD, TimeValue Time) {
   return std::error_code();
 #else
 #warning Missing futimes() and futimens()
-  return make_error_code(errc::not_supported);
+  return make_error_code(errc::function_not_supported);
 #endif
 }