]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
Add minimal support for building non-GUI parts of wxWidgets for Android.
[wxWidgets.git] / src / common / filename.cpp
index 683ac3495199e6505f1882d3a528ba2d58d4df2e..79e2cae278bf61ba61ed050a2e7f39b3385223bc 100644 (file)
@@ -2666,12 +2666,14 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
     wxStructStat stBuf;
     if ( wxStat( GetFullPath(), &stBuf) == 0 )
     {
     wxStructStat stBuf;
     if ( wxStat( GetFullPath(), &stBuf) == 0 )
     {
+        // Android defines st_*time fields as unsigned long, but time_t as long,
+        // hence the static_casts.
         if ( dtAccess )
         if ( dtAccess )
-            dtAccess->Set(stBuf.st_atime);
+            dtAccess->Set(static_cast<time_t>(stBuf.st_atime));
         if ( dtMod )
         if ( dtMod )
-            dtMod->Set(stBuf.st_mtime);
+            dtMod->Set(static_cast<time_t>(stBuf.st_mtime));
         if ( dtCreate )
         if ( dtCreate )
-            dtCreate->Set(stBuf.st_ctime);
+            dtCreate->Set(static_cast<time_t>(stBuf.st_ctime));
 
         return true;
     }
 
         return true;
     }