diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-07-24 15:03:05 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-07-24 15:03:05 +0000 |
commit | 111fcca2810f20917f1c0b6cb4b3a39b3cada170 (patch) | |
tree | 881dbb9bf1b6db8ae06045606136436d0ca61098 /sysutils/fusefs-unionfs/files/patch-src__unionfs.c | |
parent | - update to 0.26 (diff) |
Add the forgotten patches
Notes
Notes:
svn path=/head/; revision=323605
Diffstat (limited to 'sysutils/fusefs-unionfs/files/patch-src__unionfs.c')
-rw-r--r-- | sysutils/fusefs-unionfs/files/patch-src__unionfs.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sysutils/fusefs-unionfs/files/patch-src__unionfs.c b/sysutils/fusefs-unionfs/files/patch-src__unionfs.c new file mode 100644 index 000000000000..859351cb25c7 --- /dev/null +++ b/sysutils/fusefs-unionfs/files/patch-src__unionfs.c @@ -0,0 +1,40 @@ +--- ./src/unionfs.c.orig 2012-09-11 00:06:32.000000000 +0200 ++++ ./src/unionfs.c 2013-07-24 16:54:01.555073796 +0200 +@@ -83,7 +83,11 @@ + char p[PATHLEN_MAX]; + if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG); + ++#if __FreeBSD__ ++ int res = lchmod(p, mode); ++#else + int res = chmod(p, mode); ++#endif + if (res == -1) RETURN(-errno); + + RETURN(0); +@@ -190,7 +194,7 @@ + DBG("%s\n", path); + + if (uopt.stats_enabled && strcmp(path, STATS_FILENAME) == 0) { +- memset(stbuf, 0, sizeof(stbuf)); ++ memset(stbuf, 0, sizeof(*stbuf)); + stbuf->st_mode = S_IFREG | 0444; + stbuf->st_nlink = 1; + stbuf->st_size = STATS_SIZE; +@@ -663,7 +667,16 @@ + char p[PATHLEN_MAX]; + if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG); + ++#ifdef __FreeBSD__ ++ struct timeval tv[2]; ++ tv[0].tv_sec = ts[0].tv_sec; ++ tv[0].tv_usec = ts[0].tv_nsec / 1000; ++ tv[1].tv_sec = ts[0].tv_sec; ++ tv[1].tv_usec = ts[0].tv_nsec / 1000; ++ int res = lutimes(p, tv); ++#else + int res = utimensat(0, p, ts, AT_SYMLINK_NOFOLLOW); ++#endif + + if (res == -1) RETURN(-errno); + |