Fix build/compile for non-blktrace platforms
authorJens Axboe <jens.axboe@oracle.com>
Tue, 22 May 2007 11:27:30 +0000 (13:27 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 22 May 2007 11:27:30 +0000 (13:27 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h
os/os-linux.h
os/os.h

diff --git a/fio.h b/fio.h
index 9a43c6f65edc05c64a5f3e3d6879b7599c068de7..2104e3a9325dd2456c2dfe91a6837c5c9d08a9c8 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -826,8 +826,10 @@ extern void td_io_close_file(struct thread_data *, struct fio_file *);
 /*
  * blktrace support
  */
 /*
  * blktrace support
  */
+#ifdef FIO_HAVE_BLKTRACE
 extern int is_blktrace(const char *);
 extern int load_blktrace(struct thread_data *, const char *);
 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
 
 /*
  * If logging output to a file, stderr should go to both stderr and f_err
index a4f7b244172d2dbefc0b24ac754df9327640cc4a..7fa0c9566a6d4e24405b93563f3958b87dd639bb 100644 (file)
@@ -22,6 +22,7 @@
 #define FIO_HAVE_ODIRECT
 #define FIO_HAVE_HUGETLB
 #define FIO_HAVE_RAWBIND
 #define FIO_HAVE_ODIRECT
 #define FIO_HAVE_HUGETLB
 #define FIO_HAVE_RAWBIND
+#define FIO_HAVE_BLKTRACE
 
 #define OS_MAP_ANON            (MAP_ANONYMOUS)
 
 
 #define OS_MAP_ANON            (MAP_ANONYMOUS)
 
diff --git a/os/os.h b/os/os.h
index e630627fddea38f4bfbb4608fe00af1f0f2142ea..660dcc5202dc948e430224bdc33591dda9591dbf 100644 (file)
--- a/os/os.h
+++ b/os/os.h
 #define fio_lookup_raw(dev, majdev, mindev)    1
 #endif
 
 #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
 #endif