fix darwin build

This commit is contained in:
Joshua Warner 2013-10-24 14:07:53 -06:00
parent b20dcd268c
commit 187d5dfde9

View File

@ -590,9 +590,13 @@ Java_java_io_File_lastModified(JNIEnv* e, jclass, jstring path)
if (res == -1) { if (res == -1) {
return 0; return 0;
} }
# ifdef __APPLE__
return (static_cast<jlong>(fileStat.st_mtim.tv_sec) * 1000) + #define MTIME st_mtimespec
(static_cast<jlong>(fileStat.st_mtim.tv_nsec) / (1000*1000)); # else
#define MTIME st_mtim
# endif
return (static_cast<jlong>(fileStat.MTIME.tv_sec) * 1000) +
(static_cast<jlong>(fileStat.MTIME.tv_nsec) / (1000*1000));
#endif #endif
} }