aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_misc.h
diff options
context:
space:
mode:
authorGravatar Csaba Henk <csaba.henk@creo.hu>2006-09-24 14:53:29 +0000
committerGravatar Csaba Henk <csaba.henk@creo.hu>2006-09-24 14:53:29 +0000
commit3e3a125bd5f1d0f216bb78345cea2dc860082fba (patch)
tree7460bcc517020af691ff835812a810cad6fd7bd8 /lib/fuse_misc.h
parenteafdf42a69455f49fc8f935270fec7550bbc4e7c (diff)
Support for nanosec times on FBSD and other FBSD fixes
Diffstat (limited to 'lib/fuse_misc.h')
-rw-r--r--lib/fuse_misc.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h
index 3a02655..57a1e37 100644
--- a/lib/fuse_misc.h
+++ b/lib/fuse_misc.h
@@ -22,6 +22,16 @@ static inline void fuse_mutex_init(pthread_mutex_t *mut)
}
#endif
-
-
-
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
+/* Linux */
+#define ST_ATIM(stbuf) (stbuf)->st_atim
+#define ST_CTIM(stbuf) (stbuf)->st_ctim
+#define ST_MTIM(stbuf) (stbuf)->st_mtim
+#define FUSE_STAT_HAS_NANOSEC 1
+#elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC)
+/* FreeBSD */
+#define ST_ATIM(stbuf) (stbuf)->st_atimespec
+#define ST_CTIM(stbuf) (stbuf)->st_ctimespec
+#define ST_MTIM(stbuf) (stbuf)->st_mtimespec
+#define FUSE_STAT_HAS_NANOSEC 1
+#endif