From ae6b590fef74cd9cd17875d239f0f7f9170529d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 10 Mar 2015 13:27:58 +0100 Subject: [PATCH] unix: fix compilation on Android Thanks @julien33 for the patch. Fixes: https://github.com/libuv/libuv/issues/252 PR-URL: https://github.com/libuv/libuv/pull/253 Reviewed-By: Ben Noordhuis --- src/unix/fs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/unix/fs.c b/src/unix/fs.c index 91e5d4e2..d0b3257b 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -661,6 +661,17 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) { dst->st_birthtim.tv_nsec = src->st_birthtimespec.tv_nsec; dst->st_flags = src->st_flags; dst->st_gen = src->st_gen; +#elif defined(__ANDROID__) + dst->st_atim.tv_sec = src->st_atime; + dst->st_atim.tv_nsec = src->st_atime_nsec; + dst->st_mtim.tv_sec = src->st_mtime; + dst->st_mtim.tv_nsec = src->st_mtime_nsec; + dst->st_ctim.tv_sec = src->st_ctime; + dst->st_ctim.tv_nsec = src->st_ctime_nsec; + dst->st_birthtim.tv_sec = src->st_ctime; + dst->st_birthtim.tv_nsec = src->st_ctime_nsec; + dst->st_flags = 0; + dst->st_gen = 0; #elif !defined(_AIX) && ( \ defined(_BSD_SOURCE) || \ defined(_SVID_SOURCE) || \