diff options
Diffstat (limited to 'src/input/plugins')
-rw-r--r-- | src/input/plugins/FileInputPlugin.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input/plugins/FileInputPlugin.cxx b/src/input/plugins/FileInputPlugin.cxx index 9e0398916..cc8e62413 100644 --- a/src/input/plugins/FileInputPlugin.cxx +++ b/src/input/plugins/FileInputPlugin.cxx @@ -65,10 +65,13 @@ 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(), std::move(reader), info.GetSize(), |