At least OSX doesn't have this option or define, just make it
available if it's there on the platform we're building on.
Fixes:
eb314e7072a0 ("fio: add support for POSIX_FADV_NOREUSE")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
flags = POSIX_FADV_RANDOM;
else if (td->o.fadvise_hint == F_ADV_SEQUENTIAL)
flags = POSIX_FADV_SEQUENTIAL;
+#ifdef POSIX_FADV_NOREUSE
else if (td->o.fadvise_hint == F_ADV_NOREUSE)
flags = POSIX_FADV_NOREUSE;
+#endif
else {
log_err("fio: unknown fadvise type %d\n",
td->o.fadvise_hint);
#include <ctype.h>
#include <string.h>
#include <assert.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <netinet/in.h>
.oval = F_ADV_SEQUENTIAL,
.help = "Advise using FADV_SEQUENTIAL",
},
+#ifdef POSIX_FADV_NOREUSE
{ .ival = "noreuse",
.oval = F_ADV_NOREUSE,
.help = "Advise using FADV_NOREUSE",
},
+#endif
},
.help = "Use fadvise() to advise the kernel on IO pattern",
.def = "1",