svn commit: r410820 - in head/sysutils/freefilesync: . files
Jan Beich
jbeich at FreeBSD.org
Fri Mar 11 10:42:56 UTC 2016
Author: jbeich
Date: Fri Mar 11 10:42:54 2016
New Revision: 410820
URL: https://svnweb.freebsd.org/changeset/ports/410820
Log:
sysutils/freefilesync: unbreak build on 10.x (partially r410810)
../../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)
Reviewed by: portmgr (mat)
Added:
head/sysutils/freefilesync/files/patch-zen_file__access.cpp (contents, props changed)
Modified:
head/sysutils/freefilesync/Makefile (contents, props changed)
Modified: head/sysutils/freefilesync/Makefile
==============================================================================
--- head/sysutils/freefilesync/Makefile Fri Mar 11 10:39:04 2016 (r410819)
+++ head/sysutils/freefilesync/Makefile Fri Mar 11 10:42:54 2016 (r410820)
@@ -17,6 +17,8 @@ LIB_DEPENDS= libboost_system.so:${PORTSD
libnotify.so:${PORTSDIR}/devel/libnotify
WRKSRC= ${WRKDIR}/FreeFileSync/Source
+DOS2UNIX_WRKSRC=${WRKDIR}
+DOS2UNIX_GLOB= *.cpp *.h
USES= compiler:c++14-lang dos2unix gmake pkgconfig zip
USE_LDCONFIG= yes
Added: head/sysutils/freefilesync/files/patch-zen_file__access.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/freefilesync/files/patch-zen_file__access.cpp Fri Mar 11 10:42:54 2016 (r410820)
@@ -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
+ }
+
+
More information about the svn-ports-all
mailing list