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

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

commit 88da2b4adb5b737b44c71103fb48889779cfaa9d
Author: dongjiuzhu1 <[email protected]>
AuthorDate: Wed Jun 12 10:20:46 2024 +0800

    include/nuttx/compiler.h: fix redefine about offsetof
    
    nuttx/compiler.h:176:11: warning: 'offsetof' macro redefined 
[-Wmacro-redefined]
              ^
    clang/14.0.6/include/stddef.h:104:9: note: previous definition is here
    
    Signed-off-by: dongjiuzhu1 <[email protected]>
---
 include/nuttx/compiler.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 6f82b6f9f9..eb93a419ef 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -85,6 +85,8 @@
 
 #endif
 
+#undef offsetof
+
 /* GCC-specific definitions *************************************************/
 
 #ifdef __GNUC__

Reply via email to