fix_hurd_build
authorTobias Frost <tobi@debian.org>
Thu, 22 Feb 2018 11:23:56 +0000 (12:23 +0100)
committerMaximiliano Curia <maxy@debian.org>
Thu, 17 Jan 2019 23:29:50 +0000 (23:29 +0000)
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 2821a4a3ed2d7b5390b3358f46228ce9f3253846..2fc03bc8ec4b47db9f74d254e8a75e74c00b8d9f 100644 (file)
@@ -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
index 7ed0ae889cd1b22205c71a2eed40a1d2fbfcc790..74338aea734689f74efa3c449574b5b1fe90fb8b 100644 (file)
@@ -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