mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Build fix for Android NDK which has neither futimes nor futimens
Based on a patch by Neil Henning! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197045 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user