mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
sysutils/freefilesync: fixup runtime for DragonFly
No PORTREVISION bump as DragonFly build is still broken. PR: 207879
This commit is contained in:
parent
a3ffa09586
commit
fc9825be88
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410824
@ -1,22 +1,25 @@
|
||||
--- ../../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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user