Merge branch 'asmfix' of https://github.com/oohal/fio
[fio.git] / os / os-android.h
index c56d6827109ad09befe8b429617e4932e82eaa70..bb590e4786fe3f713ed7e1a1914963ecc9dc1276 100644 (file)
@@ -7,6 +7,7 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 #include <sys/syscall.h>
+#include <sys/sysmacros.h>
 #include <sys/vfs.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -273,7 +274,7 @@ static inline unsigned long long get_fs_free_size(const char *path)
        return ret;
 }
 
-static inline int os_trim(int fd, unsigned long long start,
+static inline int os_trim(struct fio_file *f, unsigned long long start,
                          unsigned long long len)
 {
        uint64_t range[2];
@@ -281,7 +282,7 @@ static inline int os_trim(int fd, unsigned long long start,
        range[0] = start;
        range[1] = len;
 
-       if (!ioctl(fd, BLKDISCARD, range))
+       if (!ioctl(f->fd, BLKDISCARD, range))
                return 0;
 
        return errno;