diff options
author | Greg Hackmann <ghackmann@google.com> | 2014-05-06 08:48:18 -0700 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2014-05-06 08:48:18 -0700 |
commit | 7a5e2bd0621ee0b1c66d8f4c21497ffb62feff42 (patch) | |
tree | 12d1c6c7e138ec37cd12176e1cc3de54f8c5aca9 /adb | |
parent | 0e998680709729232982e7252440b19e885e2284 (diff) | |
download | system_core-7a5e2bd0621ee0b1c66d8f4c21497ffb62feff42.zip system_core-7a5e2bd0621ee0b1c66d8f4c21497ffb62feff42.tar.gz system_core-7a5e2bd0621ee0b1c66d8f4c21497ffb62feff42.tar.bz2 |
adb: replace utimes() with utime()
Fix the win_sdk host build by replacing utimes() with utime(). utime()
is functionally equivalent to utimes() when dealing with non-fractional
second timestamps, and is supported by the Windows CRT.
(The Windows CRT uses the nonstandard name _utime(), but mingw creates
aliases to the POSIX names.)
Change-Id: I513c6c5de05376c34cbb0894a94259acba8ae6f1
Diffstat (limited to 'adb')
-rw-r--r-- | adb/file_sync_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/adb/file_sync_client.c b/adb/file_sync_client.c index a178995..3da54c4 100644 --- a/adb/file_sync_client.c +++ b/adb/file_sync_client.c @@ -25,6 +25,7 @@ #include <limits.h> #include <sys/types.h> #include <zipfile/zipfile.h> +#include <utime.h> #include "sysdeps.h" #include "adb.h" @@ -935,8 +936,8 @@ static int remote_build_list(int syncfd, copyinfo **filelist, static int set_time_and_mode(const char *lpath, unsigned int time, unsigned int mode) { - struct timeval times[2] = { {time, 0}, {time, 0} }; - int r1 = utimes(lpath, times); + struct utimbuf times = { time, time }; + int r1 = utime(lpath, ×); /* use umask for permissions */ mode_t mask=umask(0000); |