Merge tag 'v0.20.21'

release v0.20.21
This commit is contained in:
Max Kellermann
2018-08-17 20:02:27 +02:00
13 changed files with 59 additions and 29 deletions

View File

@@ -64,12 +64,9 @@ OpenFileInputStream(Path path, Mutex &mutex)
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.ToUTF8Throw().c_str(),

View File

@@ -202,6 +202,7 @@ CueParser::Feed2(char *p) noexcept
return;
if (strcmp(type, "WAVE") != 0 &&
strcmp(type, "FLAC") != 0 && /* non-standard */
strcmp(type, "MP3") != 0 &&
strcmp(type, "AIFF") != 0) {
state = IGNORE_FILE;

View File

@@ -22,21 +22,6 @@
#include "EPollFD.hxx"
#include "Error.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) noexcept
{
return syscall(__NR_epoll_create1, flags);
}
#endif
EPollFD::EPollFD()
:fd(::epoll_create1(EPOLL_CLOEXEC))
{