summaryrefslogtreecommitdiff
path: root/sysutils/freefilesync/files/patch-zen_file__access.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-03-11 07:41:18 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-03-11 07:41:18 +0000
commitb858bdd8f2eaaec5163f0a4121ab799875a07518 (patch)
tree0cee99d9da266d74b452795981b4ad959ef5c172 /sysutils/freefilesync/files/patch-zen_file__access.cpp
parentUnbreak on -CURRENT (taskqueue_enqueue_fast(9) removed). (diff)
mainsysutils/freefilesync: unbreak build on 10.x
error: invalid value 'c++14' in '-std=c++14' ../../zen/file_access.cpp:893:15: error: no member named 'futimens' in the global namespace if (::futimens(fdFile, newTimes) != 0) ~~^ ../../zen/file_access.cpp:898:15: error: no member named 'utimensat' in the global namespace if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0) ~~^ 2 errors generated. PR: 207879 Reported by: pkg-fallout Approved by: kevlo (maintainer, previous version)
Notes
Notes: svn path=/head/; revision=410810
Diffstat (limited to 'sysutils/freefilesync/files/patch-zen_file__access.cpp')
-rw-r--r--sysutils/freefilesync/files/patch-zen_file__access.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/sysutils/freefilesync/files/patch-zen_file__access.cpp b/sysutils/freefilesync/files/patch-zen_file__access.cpp
new file mode 100644
index 000000000000..385996b71b9d
--- /dev/null
+++ b/sysutils/freefilesync/files/patch-zen_file__access.cpp
@@ -0,0 +1,23 @@
+--- ../../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
+ //https://sourceforge.net/p/freefilesync/discussion/open-discussion/thread/218564cf/
+ newTimes[1] = modTime; //modification time
+
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if __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
+ 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
+ }
+
+