You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
630 B

diff -u -r ../optipng-0.7.4/src/optipng/osys.c ./src/optipng/osys.c
--- ../optipng-0.7.4/src/optipng/osys.c 2012-08-25 02:12:00.000000000 +0200
+++ ./src/optipng/osys.c 2014-03-19 00:09:20.000000000 +0100
@@ -514,8 +514,15 @@
{
struct timespec times[2];
+#ifdef __ANDROID__
+ times[0].tv_sec = sbuf.st_atime;
+ times[0].tv_nsec = sbuf.st_atime_nsec;
+ times[1].tv_sec = sbuf.st_mtime;
+ times[1].tv_nsec = sbuf.st_mtime_nsec;
+#else
times[0] = sbuf.st_atim;
times[1] = sbuf.st_mtim;
+#endif
if (utimensat(AT_FDCWD, dest_path, times, 0) != 0)
return -1;
}