t/io_uring: use the right check for when to wait
[fio.git] / os / os-dragonfly.h
index 713046f53543442a89d21c55ace2cbcd05839d4b..eb92521fa5ed4edab58134f1dbdff17c88fc26a2 100644 (file)
 #include <sys/sysctl.h>
 #include <sys/statvfs.h>
 #include <sys/diskslice.h>
-#include <sys/ioctl_compat.h>
 #include <sys/usched.h>
 #include <sys/resource.h>
 
+/* API changed during "5.3 development" */
+#if __DragonFly_version < 500302
+#include <sys/ioctl_compat.h>
+#define DAIOCTRIM      IOCTLTRIM
+#else
+#include <bus/cam/scsi/scsi_daio.h>
+#endif
+
 #include "../file.h"
 #include "../lib/types.h"
 
 #define FIO_HAVE_ODIRECT
-#define FIO_USE_GENERIC_RAND
 #define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_FS_STAT
 #define FIO_HAVE_TRIM
@@ -222,7 +228,7 @@ static inline int os_trim(struct fio_file *f, unsigned long long start,
        range[0] = start;
        range[1] = len;
 
-       if (!ioctl(f->fd, IOCTLTRIM, range))
+       if (!ioctl(f->fd, DAIOCTRIM, range))
                return 0;
 
        return errno;