From db3a42fc4334422cbaf2e87177f875dbb4b57963 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Fri, 21 Mar 2014 14:00:13 +0100 Subject: [PATCH] Redefine assert if already defined since some platforms already have an assert definition --- core/lib/assert.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/lib/assert.h b/core/lib/assert.h index da9fd8f9b..3689a8b1d 100644 --- a/core/lib/assert.h +++ b/core/lib/assert.h @@ -28,9 +28,10 @@ * */ -#ifndef ASSERT_H -#define ASSERT_H +#ifndef ASSERT_H_ +#define ASSERT_H_ +#undef assert #ifdef NDEBUG #define assert(e) ((void)0) #else @@ -44,4 +45,4 @@ void _xassert(const char *, int); #define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] #endif -#endif /* ASSERT_H */ +#endif /* ASSERT_H_ */