mirror of https://github.com/vitalif/grive2
Make it compile on OS X
parent
6f94393a5e
commit
867d1c3725
|
@ -40,7 +40,11 @@ DateTime FileMTime( const std::string& filename )
|
|||
if ( ::stat( filename.c_str(), &s ) != 0 )
|
||||
throw std::runtime_error( "cannot get file attribute of " + filename ) ;
|
||||
|
||||
return DateTime( s.st_mtim.tv_sec, s.st_mtim.tv_nsec ) ;
|
||||
#ifdef __APPLE__ && __DARWIN_64_BIT_INO_T
|
||||
return DateTime( s.st_mtimespec.tv_sec, s.st_mtimespec.tv_nsec ) ;
|
||||
#else
|
||||
return DateTime( s.st_mtim.tv_sec, s.st_mtim.tv_nsec);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetFileTime( const std::string& filename, const DateTime& t )
|
||||
|
|
Loading…
Reference in New Issue