Merge tag 'v0.20.17'

release v0.20.17
This commit is contained in:
Max Kellermann
2018-02-11 13:22:43 +01:00
21 changed files with 150 additions and 24 deletions

View File

@@ -65,9 +65,12 @@ OpenFileInputStream(Path path,
throw FormatRuntimeError("Not a regular file: %s",
path.c_str());
#if !defined(__BIONIC__) || __ANDROID_API__ >= 21
/* posix_fadvise() requires Android API 21 */
#ifdef POSIX_FADV_SEQUENTIAL
posix_fadvise(reader.GetFD().Get(), (off_t)0, info.GetSize(),
POSIX_FADV_SEQUENTIAL);
#endif
#endif
return std::make_unique<FileInputStream>(path.ToUTF8().c_str(),