diff options
-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 2d2850c74..518de233a 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 InputStreamPtr(new FileInputStream(path.ToUTF8().c_str(), std::move(reader), info.GetSize(), |