You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2023/02/06 14:04:36 UTC
[nuttx] branch master updated: libc: Define _assert/__assert to avoid 3rd libary redefine them
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 65a04c66a2 libc: Define _assert/__assert to avoid 3rd libary redefine them
65a04c66a2 is described below
commit 65a04c66a25c6ee4746123d1993424e33b3b36b5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Feb 6 02:43:39 2023 +0800
libc: Define _assert/__assert to avoid 3rd libary redefine them
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
include/assert.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/assert.h b/include/assert.h
index 2099157cb3..c72a3b998b 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -78,6 +78,11 @@
# define assert(f) ASSERT(f)
#endif
+/* Suppress 3rd party library redefine _assert/__assert */
+
+#define _assert _assert
+#define __assert __assert
+
/* Definition required for C11 compile-time assertion checking. The
* static_assert macro simply expands to the _Static_assert keyword.
*/