+/* fio code is Linux based, so rename macros to Linux style */
+#define IOPRIO_WHO_PROCESS PRIO_PROCESS
+#define IOPRIO_WHO_PGRP PRIO_PGRP
+#define IOPRIO_WHO_USER PRIO_USER
+
+#define IOPRIO_MIN_PRIO 1 /* lowest priority */
+#define IOPRIO_MAX_PRIO 10 /* highest priority */
+
+/*
+ * Prototypes declared in sys/sys/resource.h are preventing from defining
+ * ioprio_set() with 4 arguments, so define fio's ioprio_set() as a macro.
+ * Note that there is no idea of class within ioprio_set(2) unlike Linux.
+ */
+#define ioprio_set(which, who, ioprio_class, ioprio) \
+ ioprio_set(which, who, ioprio)
+