You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2022/08/08 11:40:07 UTC

[incubator-nuttx] 02/02: libc/err: Add _func suffix to avoid the the penitential symbol collision

This is an automated email from the ASF dual-hosted git repository.

davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 16d858f3ee21f68b1e9ce8fab6ecd99525695aae
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Aug 8 02:22:10 2022 +0800

    libc/err: Add _func suffix to avoid the the penitential symbol collision
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/err.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/err.h b/include/err.h
index 04d0ac0569..67b297909c 100644
--- a/include/err.h
+++ b/include/err.h
@@ -28,6 +28,22 @@
 #include <stdarg.h>
 #include <nuttx/compiler.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Append _func suffix to avoid the penitential symbol collision */
+
+#define warn   warn_func
+#define vwarn  vwarn_func
+#define warnx  warnx_func
+#define vwarnx vwarnx_func
+
+#define err    err_func
+#define verr   verr_func
+#define errx   errx_func
+#define verrx  verrx_func
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/