From: Tobias Frost Date: Thu, 22 Feb 2018 11:23:56 +0000 (+0100) Subject: fix_hurd_build X-Git-Tag: archive/raspbian/5.97.0-1+rpi1~1^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2d4eb75fc2c59a40650c9fef267c7ad0195ef784;p=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 a63b808..f4c6824 100644 --- a/src/ioslaves/file/file.cpp +++ b/src/ioslaves/file/file.cpp @@ -310,7 +310,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 a1bf5b0..7c870c6 100644 --- a/src/ioslaves/file/file_unix.cpp +++ b/src/ioslaves/file/file_unix.cpp @@ -729,7 +729,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 @@ -753,7 +753,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