From 4c765d72a6ea37f0d90315149fd53dadc54c2966 Mon Sep 17 00:00:00 2001 From: Robert Chiras Date: Thu, 3 Mar 2016 15:20:11 +0200 Subject: [PATCH] unix: fix compile error in Android using bionic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling with bionic, st_atime_nsec (and the other nsec members) canot be found. In order to compile uv with both NDK and bionic, tv_nsec should be accessed from st_atimensec (and the others nsec members). See "Compatibility with glibc" in stat.h from bionic. Signed-off-by: Robert Chiras PR-URL: https://github.com/libuv/libuv/pull/746 Reviewed-By: Saúl Ibarra Corretgé --- src/unix/fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 54253303..8936ad9d 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -749,13 +749,13 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) { 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_atim.tv_nsec = src->st_atimensec; dst->st_mtim.tv_sec = src->st_mtime; - dst->st_mtim.tv_nsec = src->st_mtime_nsec; + dst->st_mtim.tv_nsec = src->st_mtimensec; dst->st_ctim.tv_sec = src->st_ctime; - dst->st_ctim.tv_nsec = src->st_ctime_nsec; + dst->st_ctim.tv_nsec = src->st_ctimensec; dst->st_birthtim.tv_sec = src->st_ctime; - dst->st_birthtim.tv_nsec = src->st_ctime_nsec; + dst->st_birthtim.tv_nsec = src->st_ctimensec; dst->st_flags = 0; dst->st_gen = 0; #elif !defined(_AIX) && ( \