components/desktop/thunderbird/patches/firefox-44-readahead.patch
changeset 6431 e4667e7df088
equal deleted inserted replaced
6430:74bc7531ae5a 6431:e4667e7df088
       
     1 In-house patch for firefox to build with GNU compilers. 
       
     2 With GNU compiler, we have hunspell_fopen_hooks.h included 
       
     3 through mozilla-config.h.
       
     4 But we don't have an implementation for mozilla::ReadAheadFile().
       
     5 Do not plan to send upstream.
       
     6 
       
     7 diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp
       
     8 --- a/xpcom/glue/FileUtils.cpp
       
     9 +++ b/xpcom/glue/FileUtils.cpp
       
    10 @@ -481,17 +481,17 @@ mozilla::ReadAheadFile(mozilla::pathstr_
       
    11    }
       
    12    if (fd == INVALID_HANDLE_VALUE) {
       
    13      return;
       
    14    }
       
    15    ReadAhead(fd, aOffset, aCount);
       
    16    if (!aOutFd) {
       
    17      CloseHandle(fd);
       
    18    }
       
    19 -#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
       
    20 +#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(SOLARIS)
       
    21    if (!aFilePath) {
       
    22      if (aOutFd) {
       
    23        *aOutFd = -1;
       
    24      }
       
    25      return;
       
    26    }
       
    27    int fd = open(aFilePath, O_RDONLY);
       
    28    if (aOutFd) {