fix_hurd_build
authorTobias Frost <tobi@debian.org>
Thu, 22 Feb 2018 11:23:56 +0000 (12:23 +0100)
committerNorbert Preining <norbert@preining.info>
Thu, 15 Jul 2021 01:20:01 +0000 (02:20 +0100)
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
src/ioslaves/file/file_unix.cpp

index a63b808884e61137ca055fe9b3b7b2357ec42fc2..f4c68242baf8a4fe8060dbcd9a51c77e565779c6 100644 (file)
@@ -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
index a1bf5b0d545ab7e8ff1de0f6e9150b090c8d6183..7c870c61807abbbfd7503469a2e0c20fa30c371b 100644 (file)
@@ -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