From efed0aa7dd6157f3c4e16cb022eefa3ba942e470 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 29 Aug 2015 04:14:26 +0200 Subject: only use __attributes__ if compiling with gcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/assert.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/assert.h') diff --git a/include/assert.h b/include/assert.h index 7f44222..e5a963d 100644 --- a/include/assert.h +++ b/include/assert.h @@ -20,6 +20,9 @@ #include +#include + + /* The `assert` macro shall be redefined according to the the * current state of `NDEBUF` each time is included. */ @@ -86,7 +89,7 @@ __USE_GNU * @param line The line in the source code whence the assertion was made * @param func The function in the source code whence the assertion was made */ -void __attribute__((noreturn, nonnull(3, 4, 5))) +void __GCC_ONLY(__attribute__((noreturn, nonnull(3, 4, 5)))) __assert_fail(const char* expression, int errnum, const char* file, int line, const char* func); -- cgit v1.2.3-70-g09d2