From 2d4eb75fc2c59a40650c9fef267c7ad0195ef784 Mon Sep 17 00:00:00 2001 From: Tobias Frost Date: Thu, 22 Feb 2018 12:23:56 +0100 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 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 -- 2.30.2