From 5e62c22a669c7a8c03b7871852cf85ad6d355980 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 22 May 2007 13:27:30 +0200 Subject: [PATCH] Fix build/compile for non-blktrace platforms Signed-off-by: Jens Axboe --- fio.h | 2 ++ os/os-linux.h | 1 + os/os.h | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/fio.h b/fio.h index 9a43c6f6..2104e3a9 100644 --- a/fio.h +++ b/fio.h @@ -826,8 +826,10 @@ extern void td_io_close_file(struct thread_data *, struct fio_file *); /* * blktrace support */ +#ifdef FIO_HAVE_BLKTRACE extern int is_blktrace(const char *); extern int load_blktrace(struct thread_data *, const char *); +#endif /* * If logging output to a file, stderr should go to both stderr and f_err diff --git a/os/os-linux.h b/os/os-linux.h index a4f7b244..7fa0c956 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -22,6 +22,7 @@ #define FIO_HAVE_ODIRECT #define FIO_HAVE_HUGETLB #define FIO_HAVE_RAWBIND +#define FIO_HAVE_BLKTRACE #define OS_MAP_ANON (MAP_ANONYMOUS) diff --git a/os/os.h b/os/os.h index e630627f..660dcc52 100644 --- a/os/os.h +++ b/os/os.h @@ -60,4 +60,15 @@ #define fio_lookup_raw(dev, majdev, mindev) 1 #endif +#ifndef FIO_HAVE_BLKTRACE +static inline int is_blktrace(const char *fname) +{ + return 0; +} +static inline int load_blktrace(struct thread_data *td, const char *fname) +{ + return 1; +} +#endif + #endif -- 2.25.1