aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-03-11 11:26:51 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-03-11 11:26:51 +0000
commitfc9825be880916c415aad3c9a9483fd377323fdf (patch)
treec20363e0cc998f0285c5893800757ddd826566c4
parenta3ffa09586beacd8a4f4ebef60fc38a49ef5f0b1 (diff)
downloadports-fc9825be880916c415aad3c9a9483fd377323fdf.tar.gz
ports-fc9825be880916c415aad3c9a9483fd377323fdf.zip
Notes
-rw-r--r--sysutils/freefilesync/files/patch-zen_file__access.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysutils/freefilesync/files/patch-zen_file__access.cpp b/sysutils/freefilesync/files/patch-zen_file__access.cpp
index 385996b71b9d..c642df738d24 100644
--- a/sysutils/freefilesync/files/patch-zen_file__access.cpp
+++ b/sysutils/freefilesync/files/patch-zen_file__access.cpp
@@ -1,23 +1,26 @@
--- ../../zen/file_access.cpp.orig 2016-01-11 12:13:10 UTC
+++ ../../zen/file_access.cpp
-@@ -877,6 +877,11 @@ void setFileTimeRaw(const Zstring& fileP
+@@ -877,6 +877,15 @@ void setFileTimeRaw(const Zstring& fileP
//https://sourceforge.net/p/freefilesync/discussion/open-discussion/thread/218564cf/
newTimes[1] = modTime; //modification time
+#if defined(__FreeBSD__)
++// only defines __FreeBSD_version
+#include <osreldate.h>
-+#if __FreeBSD_version < 1002506 || (__FreeBSD_version >= 1100000 && __FreeBSD_version < 1100056)
++#endif
++
++#if (defined(__FreeBSD__) && (__FreeBSD_version < 1002506 || \
++ (__FreeBSD_version >= 1100000 && __FreeBSD_version < 1100056)))
+ throw ErrorLinuxFallbackToUtimes(L"");
+#else
//=> using open()/futimens() for regular files and utimensat(AT_SYMLINK_NOFOLLOW) for symlinks is consistent with "cp" and "touch"!
if (procSl == ProcSymlink::FOLLOW)
{
-@@ -898,6 +903,8 @@ void setFileTimeRaw(const Zstring& fileP
+@@ -898,6 +907,7 @@ void setFileTimeRaw(const Zstring& fileP
if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0)
THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtPath(filePath)), L"utimensat");
}
+#endif
-+#endif
}