From: Tobias Frost Date: Thu, 22 Feb 2018 11:23:56 +0000 (+0100) Subject: fix_hurd_build X-Git-Tag: archive/raspbian/6.6.0-1+rpi1~1^2^2^2^2^2^2^2^2^2^2^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=18d1656c61eacfd5ebd9c0d1e852e72622dc43bf;p=kf6-kio.git fix_hurd_build posix_fadvise64 is not available on hurd, will yield to an compiler warning and aborting the build through --fatal-warnings Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799619 Forwarded: no Gbp-Pq: Name fix_hurd_build.patch --- diff --git a/src/ioslaves/file/file.cpp b/src/ioslaves/file/file.cpp index 2821a4a..2fc03bc 100644 --- a/src/ioslaves/file/file.cpp +++ b/src/ioslaves/file/file.cpp @@ -381,7 +381,7 @@ void FileProtocol::get(const QUrl &url) } } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) //TODO check return code posix_fadvise(f.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp index 7ed0ae8..74338ae 100644 --- a/src/ioslaves/file/file_unix.cpp +++ b/src/ioslaves/file/file_unix.cpp @@ -211,7 +211,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, } } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(src_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif @@ -235,7 +235,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, // Note that error handling is omitted for this call, we don't want to error on e.g. VFAT dest_file.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner); -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(dest_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif