summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Podgorny <radek@podgorny.cz>2014-02-22 17:40:52 +0100
committerRadek Podgorny <radek@podgorny.cz>2014-02-22 17:40:52 +0100
commit32ad59359ef0dee2724c15c26643ec4af6c83491 (patch)
treebdbccf2d11a20c8a3d0bd942d04780128a37e623
parent088de16eddc048839278cebc53698681cc38425c (diff)
downloadunionfs-fuse-32ad59359ef0dee2724c15c26643ec4af6c83491.tar.gz
make utimensat support more general
Try to auto-detect utimensat support, which also allows to compile unionfs-fuse on older linux distros (e.g. centos5) again. (from bernd's tree)
-rw-r--r--src/unionfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unionfs.c b/src/unionfs.c
index 1d92543..8c8f0cb 100644
--- a/src/unionfs.c
+++ b/src/unionfs.c
@@ -62,6 +62,7 @@
#include "cow.h"
#include "string.h"
#include "usyslog.h"
+#include "conf.h"
static struct fuse_opt unionfs_opts[] = {
FUSE_OPT_KEY("chroot=%s,", KEY_CHROOT),
@@ -686,7 +687,7 @@ static int unionfs_utimens(const char *path, const struct timespec ts[2]) {
{ts[1].tv_sec, ts[1].tv_nsec / 1000},
};
int res = utimes(p, tv);
-#elif __FreeBSD__
+#elif UNIONFS_HAVE_AT
struct timeval tv[2];
tv[0].tv_sec = ts[0].tv_sec;
tv[0].tv_usec = ts[0].tv_nsec * 1000;