diff options
Diffstat (limited to 'src/3rdparty/libarchive/libarchive/android_lf.h')
-rw-r--r-- | src/3rdparty/libarchive/libarchive/android_lf.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/3rdparty/libarchive/libarchive/android_lf.h b/src/3rdparty/libarchive/libarchive/android_lf.h new file mode 100644 index 00000000..2a18f514 --- /dev/null +++ b/src/3rdparty/libarchive/libarchive/android_lf.h @@ -0,0 +1,47 @@ +/* + * Macros for file64 functions + * + * Android does not support the macro _FILE_OFFSET_BITS=64 + * As of android-21 it does however support many file64 functions +*/ + +#ifndef ARCHIVE_ANDROID_LF_H_INCLUDED +#define ARCHIVE_ANDROID_LF_H_INCLUDED + +#if __ANDROID_API__ > 20 + +#include <dirent.h> +#include <fcntl.h> +#include <unistd.h> +#include <sys/stat.h> +#include <sys/statvfs.h> +#include <sys/types.h> +#include <sys/vfs.h> + +//dirent.h +#define readdir_r readdir64_r +#define readdir readdir64 +#define dirent dirent64 +//fcntl.h +#define openat openat64 +#define open open64 +#define mkstemp mkstemp64 +//unistd.h +#define lseek lseek64 +#define ftruncate ftruncate64 +//sys/stat.h +#define fstatat fstatat64 +#define fstat fstat64 +#define lstat lstat64 +#define stat stat64 +//sys/statvfs.h +#define fstatvfs fstatvfs64 +#define statvfs statvfs64 +//sys/types.h +#define off_t off64_t +//sys/vfs.h +#define fstatfs fstatfs64 +#define statfs statfs64 +#endif + +#endif /* ARCHIVE_ANDROID_LF_H_INCLUDED */ |