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


The following commit(s) were added to refs/heads/master by this push:
     new 54740b3ad2 win/MSVC: add packed_struct macro implement
54740b3ad2 is described below

commit 54740b3ad21f3b62334ee2956a0dedf00af778de
Author: chao an <[email protected]>
AuthorDate: Thu Jul 13 22:45:30 2023 +0800

    win/MSVC: add packed_struct macro implement
    
    Signed-off-by: chao an <[email protected]>
---
 include/nuttx/compiler.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index fdf0435a71..cfebbf8ad8 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -880,8 +880,8 @@
 #  define aligned_data(n)
 #  define locate_code(n)
 #  define locate_data(n)
-#  define begin_packed_struct
-#  define end_packed_struct
+#  define begin_packed_struct __pragma(pack(push, 1))
+#  define end_packed_struct __pragma(pack(pop))
 #  define reentrant_function
 #  define naked_function
 #  define always_inline_function

Reply via email to