android support

This commit is contained in:
Arvid Norberg
2013-11-27 16:58:02 +00:00
parent fc2fc8dfb2
commit 65fe1b1212
3 changed files with 39 additions and 6 deletions

View File

@@ -80,7 +80,14 @@ POSSIBILITY OF SUCH DAMAGE.
#ifdef TORRENT_LINUX
// linux specifics
#ifdef TORRENT_ANDROID
#include <sys/vfs.h>
#define statvfs statfs
#define fstatvfs fstatfs
#else
#include <sys/statvfs.h>
#endif
#include <sys/ioctl.h>
#include <linux/types.h>
#ifdef HAVE_LINUX_FIEMAP_H
@@ -88,6 +95,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <linux/fs.h> // FS_IOC_FIEMAP
#endif
#ifdef TORRENT_ANDROID
#include <sys/syscall.h>
#define lseek lseek64
#endif
#include <asm/unistd.h> // For __NR_fallocate
// circumvent the lack of support in glibc