summaryrefslogtreecommitdiffstats
path: root/fuse
diff options
context:
space:
mode:
authorRichard Jones <rjones@centos5x32.home.annexia.org>2009-11-18 16:01:23 +0000
committerRichard Jones <rjones@redhat.com>2009-11-18 17:33:17 +0000
commit83eb2cf2fddbe3e06f50c18d5e651853f8d86813 (patch)
treec7c97e75f0e6ce68aef7f426158eb0120d77c28a /fuse
parent09d7b265e6a0b78592b0a8cc78d9382fd5cb680b (diff)
downloadlibguestfs-83eb2cf2fddbe3e06f50c18d5e651853f8d86813.tar.gz
libguestfs-83eb2cf2fddbe3e06f50c18d5e651853f8d86813.tar.xz
libguestfs-83eb2cf2fddbe3e06f50c18d5e651853f8d86813.zip
fuse/RHEL: Don't require UTIME_{NOW,OMIT} to be defined.
These macros don't exist on RHEL/CentOS 5.4. If the feature is missing then just don't implement it in the FUSE layer.
Diffstat (limited to 'fuse')
-rw-r--r--fuse/guestmount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index baf2b667..05cacef0 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -534,14 +534,22 @@ fg_utimens (const char *path, const struct timespec ts[2])
time_t mtsecs = ts[1].tv_sec;
long mtnsecs = ts[1].tv_nsec;
+#ifdef UTIME_NOW
if (atnsecs == UTIME_NOW)
atnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (atnsecs == UTIME_OMIT)
atnsecs = -2;
+#endif
+#ifdef UTIME_NOW
if (mtnsecs == UTIME_NOW)
mtnsecs = -1;
+#endif
+#ifdef UTIME_OMIT
if (mtnsecs == UTIME_OMIT)
mtnsecs = -2;
+#endif
r = guestfs_utimens (g, path, atsecs, atnsecs, mtsecs, mtnsecs);
if (r == -1)