From 978d10a42b2cfccf6bfc4df1cfad480ac3bbcb3d Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 15 Jul 2014 17:41:02 +0200 Subject: libfuse: allow setting ctime in ->setattr() --- lib/fuse_misc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/fuse_misc.h') diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h index 8b76775..1839a67 100644 --- a/lib/fuse_misc.h +++ b/lib/fuse_misc.h @@ -28,6 +28,7 @@ static inline void fuse_mutex_init(pthread_mutex_t *mut) #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctim.tv_nsec) #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec) #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val) +#define ST_CTIM_NSEC_SET(stbuf, val) (stbuf)->st_ctim.tv_nsec = (val) #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val) #elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) /* FreeBSD */ @@ -35,11 +36,13 @@ static inline void fuse_mutex_init(pthread_mutex_t *mut) #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctimespec.tv_nsec) #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtimespec.tv_nsec) #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atimespec.tv_nsec = (val) +#define ST_CTIM_NSEC_SET(stbuf, val) (stbuf)->st_ctimespec.tv_nsec = (val) #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtimespec.tv_nsec = (val) #else #define ST_ATIM_NSEC(stbuf) 0 #define ST_CTIM_NSEC(stbuf) 0 #define ST_MTIM_NSEC(stbuf) 0 #define ST_ATIM_NSEC_SET(stbuf, val) do { } while (0) +#define ST_CTIM_NSEC_SET(stbuf, val) do { } while (0) #define ST_MTIM_NSEC_SET(stbuf, val) do { } while (0) #endif -- cgit v1.2.3