From c03b68ca8d5bbe7e9b5142b1426dc794e7cca1ac Mon Sep 17 00:00:00 2001 From: jpandre Date: Sat, 16 Jan 2010 18:10:33 +0000 Subject: [PATCH] Used st_[acm]timespec instead of st_[acm]tim on MacOSX (Erik Larsson) --- src/ntfs-3g.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 0bb89075..5c2f739e 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -862,9 +862,17 @@ static int ntfs_fuse_getattr(const char *org_path, struct stat *stbuf) if (S_ISLNK(stbuf->st_mode)) stbuf->st_mode |= 0777; stbuf->st_ino = ni->mft_no; - stbuf->st_atim = ntfs2timespec(ni->last_access_time); - stbuf->st_ctim = ntfs2timespec(ni->last_mft_change_time); - stbuf->st_mtim = ntfs2timespec(ni->last_data_change_time); +#ifdef HAVE_STRUCT_STAT_ST_ATIMESPEC + stbuf->st_atimespec = ntfs2timespec(ni->last_access_time); + stbuf->st_ctimespec = ntfs2timespec(ni->last_mft_change_time); + stbuf->st_mtimespec = ntfs2timespec(ni->last_data_change_time); +#elif defined(HAVE_STRUCT_STAT_ST_ATIM) + stbuf->st_atim = ntfs2timespec(ni->last_access_time); + stbuf->st_ctim = ntfs2timespec(ni->last_mft_change_time); + stbuf->st_mtim = ntfs2timespec(ni->last_data_change_time); +#else + #error "No known timespec member in struct stat!" +#endif exit: if (ntfs_inode_close(ni)) set_fuse_error(&res);