android: raise minSdkVersion to 21
The number of MPD installs on Android < 5.0 is negligible, and that API version introduces lots of useful features for MPD.
This commit is contained in:
@@ -65,12 +65,9 @@ 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(),
|
||||
|
@@ -22,21 +22,6 @@
|
||||
#include "EPollFD.hxx"
|
||||
#include "FatalError.hxx"
|
||||
|
||||
#if defined(__BIONIC__) && __ANDROID_API__ < 21
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define EPOLL_CLOEXEC O_CLOEXEC
|
||||
|
||||
static inline int
|
||||
epoll_create1(int flags)
|
||||
{
|
||||
return syscall(__NR_epoll_create1, flags);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
EPollFD::EPollFD()
|
||||
:fd(::epoll_create1(EPOLL_CLOEXEC))
|
||||
{
|
||||
|
Reference in New Issue
Block a user