Avoid double declaration of leXX_to_cpu
authorDaniel Gollub <daniel.gollub@gmail.com>
Thu, 1 May 2014 12:07:04 +0000 (14:07 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 1 May 2014 17:21:55 +0000 (11:21 -0600)
for external ioengines. leXX_to_cpu is a very common
declaration - e.g. Ceph is using this as well.

Signed-off-by: Daniel Gollub <daniel.gollub@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
os/os.h

diff --git a/os/os.h b/os/os.h
index 98b45321962309baa304c3b87b30b819c3aa0888..b8eee66a14501fd2d083dda2920684940b7cb815 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -200,6 +200,7 @@ static inline uint64_t fio_swap64(uint64_t val)
 #endif
 #endif /* FIO_HAVE_BYTEORDER_FUNCS */
 
+#ifdef FIO_INTERNAL
 #define le16_to_cpu(val) ({                    \
        __le16_to_cpu(val);                     \
 })
@@ -209,6 +210,8 @@ static inline uint64_t fio_swap64(uint64_t val)
 #define le64_to_cpu(val) ({                    \
        __le64_to_cpu(val);                             \
 })
+#endif
+
 #define cpu_to_le16(val) ({                    \
        __cpu_to_le16(val);                     \
 })