From: Jens Axboe Date: Sun, 24 Jun 2007 20:41:27 +0000 (+0200) Subject: Guard __must_check ifdef X-Git-Tag: fio-1.16.6~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=72711fb74534e2caa15a1a775ff8d5e531fb8fef 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 --- diff --git a/compiler/compiler-gcc3.h b/compiler/compiler-gcc3.h index ab8ccc4f..566987a2 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 bb9cc7c5..f136611d 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