fix_hurd_build
authorTobias Frost <tobi@debian.org>
Sun, 15 May 2016 19:03:09 +0000 (21:03 +0200)
committerMaximiliano Curia <maxy@debian.org>
Wed, 5 Apr 2017 08:10:59 +0000 (09:10 +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 b4fd7f2077b5950bfd06d014f99aba2c98a0d66f..db48b29589e3168c8c722e564b5ed698ea9e6298 100644 (file)
@@ -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
index d901a63dcf184b1a75ab1cc8b4007fb6650e3f79..ed86549fee23a2f2b1a18cfb70391cd054732cb4 100644 (file)
@@ -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