Guard __must_check ifdef
Some systems seem to pick up the kernel definitions, so check
if __must_check is defined before (potentially) redefining it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/compiler/compiler-gcc3.h b/compiler/compiler-gcc3.h
index ab8ccc4..566987a 100644
--- a/compiler/compiler-gcc3.h
+++ b/compiler/compiler-gcc3.h
@@ -2,7 +2,9 @@
#define FIO_COMPILER_GCC3_H
#if __GNUC_MINOR__ >= 4
+#ifndef __must_check
#define __must_check __attribute__((warn_unused_result))
#endif
+#endif
#endif
diff --git a/compiler/compiler-gcc4.h b/compiler/compiler-gcc4.h
index bb9cc7c..f136611 100644
--- a/compiler/compiler-gcc4.h
+++ b/compiler/compiler-gcc4.h
@@ -1,6 +1,8 @@
#ifndef FIO_COMPILER_GCC4_H
#define FIO_COMPILER_GCC4_H
+#ifndef __must_check
#define __must_check __attribute__((warn_unused_result))
+#endif
#endif