components/desktop/firefox/patches/firefox-44-readahead.patch
branchs11u3-sru
changeset 7035 4c2f26e9d5ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox-44-readahead.patch	Mon Sep 05 05:00:46 2016 -0700
@@ -0,0 +1,28 @@
+In-house patch for firefox to build with GNU compilers. 
+With GNU compiler, we have hunspell_fopen_hooks.h included 
+through mozilla-config.h.
+But we don't have an implementation for mozilla::ReadAheadFile().
+Do not plan to send upstream.
+
+diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp
+--- a/xpcom/glue/FileUtils.cpp
++++ b/xpcom/glue/FileUtils.cpp
+@@ -481,17 +481,17 @@ mozilla::ReadAheadFile(mozilla::pathstr_
+   }
+   if (fd == INVALID_HANDLE_VALUE) {
+     return;
+   }
+   ReadAhead(fd, aOffset, aCount);
+   if (!aOutFd) {
+     CloseHandle(fd);
+   }
+-#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
++#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(SOLARIS)
+   if (!aFilePath) {
+     if (aOutFd) {
+       *aOutFd = -1;
+     }
+     return;
+   }
+   int fd = open(aFilePath, O_RDONLY);
+   if (aOutFd) {