]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: use st_mtimespec instea of st_mtime on osx 17615/head
authorKefu Chai <kchai@redhat.com>
Wed, 13 Sep 2017 09:44:35 +0000 (17:44 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Sep 2017 04:02:36 +0000 (12:02 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/client/Client.cc

index 59049adbeacda53f689862f7fc9b68cebbc37362..049f33b8ad7b91f6627cc594313afb77229b5384 100644 (file)
@@ -6831,8 +6831,13 @@ void Client::stat_to_statx(struct stat *st, struct ceph_statx *stx)
   stx->stx_mode = st->st_mode;
   stx->stx_uid = st->st_uid;
   stx->stx_gid = st->st_gid;
+#ifdef __APPLE__
+  stx->stx_mtime = st->st_mtimespec;
+  stx->stx_atime = st->st_atimespec;
+#else
   stx->stx_mtime = st->st_mtim;
   stx->stx_atime = st->st_atim;
+#endif
 }
 
 int Client::__setattrx(Inode *in, struct ceph_statx *stx, int mask,