return -1;
}
#endif
+
+#ifndef FIO_HAVE_FADVISE
+int _weak posix_fadvise(int fd, off_t offset, off_t len, int advice)
+{
+ return 0;
+}
+#endif
extern int _weak clock_gettime(clockid_t clk_id, struct timespec *ts);
extern int _weak sync_file_range(int fd, off64_t offset, off64_t nbytes,
unsigned int flags);
+extern int _weak posix_fadvise(int fd, off_t offset, off_t len, int advice);
#endif /* FIO_HELPERS_H_ */
#define OS_MSG_DONTWAIT MSG_DONTWAIT
#endif
-#ifndef FIO_HAVE_FADVISE
-static inline int posix_fadvise(int fd, int off, int len, int advice)
-{
- (void)fd;
- (void)off;
- (void)len;
- (void)advice;
- return 0;
-}
-
#ifndef POSIX_FADV_DONTNEED
#define POSIX_FADV_DONTNEED (0)
#define POSIX_FADV_SEQUENTIAL (0)
#define POSIX_FADV_RANDOM (0)
#endif
-#endif /* FIO_HAVE_FADVISE */
#ifndef FIO_HAVE_CPU_AFFINITY
#define fio_setaffinity(pid, mask) (0)