From 451f766ebeb09bcdae14a54e3125aa28d9bc2b8b Mon Sep 17 00:00:00 2001 From: Tobias Frost Date: Sun, 15 May 2016 21:03:09 +0200 Subject: [PATCH] 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 --- src/ioslaves/file/file.cpp | 2 +- src/ioslaves/file/file_unix.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ioslaves/file/file.cpp b/src/ioslaves/file/file.cpp index b4fd7f2..db48b29 100644 --- a/src/ioslaves/file/file.cpp +++ b/src/ioslaves/file/file.cpp @@ -340,7 +340,7 @@ void FileProtocol::get(const QUrl &url) return; } -#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 d901a63..ed86549 100644 --- a/src/ioslaves/file/file_unix.cpp +++ b/src/ioslaves/file/file_unix.cpp @@ -128,7 +128,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, return; } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(src_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif @@ -144,7 +144,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, return; } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(dest_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif -- 2.30.2