diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-11 15:42:33 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-11 15:42:33 +0000 |
commit | b30f01ee42bc6868e3ae70812b0eb6d08fa27a2c (patch) | |
tree | ed9375b6c3c9e77ae7c8f4884d8c547c3bd401fb /llvm/lib/Support | |
parent | 50e39e0fef78051d889b64134844f69c275d9d03 (diff) | |
download | bcm5719-llvm-b30f01ee42bc6868e3ae70812b0eb6d08fa27a2c.tar.gz bcm5719-llvm-b30f01ee42bc6868e3ae70812b0eb6d08fa27a2c.zip |
Build fix for Android NDK which has neither futimes nor futimens
Based on a patch by Neil Henning!
llvm-svn: 197045
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 734ea5d110a..d5260424616 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -531,17 +531,20 @@ error_code setLastModificationAndAccessTime(int FD, TimeValue Time) { Times[0].tv_nsec = 0; Times[1] = Times[0]; if (::futimens(FD, Times)) + return error_code(errno, system_category()); + return error_code::success(); #elif defined(HAVE_FUTIMES) timeval Times[2]; Times[0].tv_sec = Time.toPosixTime(); Times[0].tv_usec = 0; Times[1] = Times[0]; if (::futimes(FD, Times)) -#else -#error Missing futimes() and futimens() -#endif return error_code(errno, system_category()); return error_code::success(); +#else +#warning Missing futimes() and futimens() + return make_error_code(errc::not_supported); +#endif } error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset) { |