Signed-off-by: Charles Briere <[email protected]>
---
 src/common/compat/fcntl.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h
index 04fe03a..80a6899 100644
--- a/src/common/compat/fcntl.h
+++ b/src/common/compat/fcntl.h
@@ -31,6 +31,27 @@ typedef off64_t loff_t;
 #endif
 
 #ifdef __linux__
+#ifdef __ANDROID__
+#include <asm/unistd.h>
+#include <sys/syscall.h>
+#define SPLICE_F_MOVE          (0x01)
+#define SPLICE_F_NONBLOCK      (0x02)
+#define SPLICE_F_MORE          (0x04)
+#define SPLICE_F_GIFT          (0x08)
+static inline ssize_t splice(int fd_in, loff_t *off_in, int fd_out,
+                             loff_t *off_out, size_t len, unsigned int flags)
+{
+       return syscall(__NR_splice,fd_in,off_in,fd_out,off_out,len,flags);
+}
+#include <linux/fs.h>
+#include <linux/fadvise.h>
+#define POSIX_FADV_DONTNEED 0
+static inline int posix_fadvise(int fd, off_t offset, off_t len, int advice)
+{
+       return -ENOSYS;
+}
+#endif /* __ANDROID__ */
+
 extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
                unsigned int flags);
 #define lttng_sync_file_range(fd, offset, nbytes, flags) \
-- 
1.8.1.msysgit.1


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to