#include "base/test/test_file_util.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "build/build_config.h"
#if BUILDFLAG(IS_ANDROID)
#include <asm/unistd.h>
#include <errno.h>
#include <linux/fadvise.h>
#include <sys/syscall.h>
#endif
#include "base/files/file_path.h"
#include "base/files/scoped_file.h"
#include "base/notimplemented.h"
namespace base {
#if BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21
namespace {
int posix_fadvise(int fd, off_t offset, off_t len, int advice) {
#if defined(ARCH_CPU_ARMEL)
return syscall(__NR_arm_fadvise64_64, fd, advice,
0,
offset,
0,
len);
#endif
NOTIMPLEMENTED();
return ENOSYS;
}
}
#endif
bool EvictFileFromSystemCache(const FilePath& file) { … }
}