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 86aed8748776c359104678dffa4cd52a97529440
Author: chao an <anc...@xiaomi.com>
AuthorDate: Wed Feb 8 16:15:48 2023 +0800

    sys/sysinfo: align sysinfo define with linux
    
    __reserved is a meaningful macro definition in msvc, cannot use this name
    
    Fix visual studio Compiler Error:
    
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d86ad86b-47b7-4677-95fb-e28b3230a009/reserved-problem?forum=vclanguage
    
    Signed-off-by: chao an <anc...@xiaomi.com>
---
 include/sys/sysinfo.h | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h
index 822bfce4cb..352b95c6ff 100644
--- a/include/sys/sysinfo.h
+++ b/include/sys/sysinfo.h
@@ -39,20 +39,19 @@
 
 struct sysinfo
 {
-  unsigned long uptime;
-  unsigned long loads[3];
-  unsigned long totalram;
-  unsigned long freeram;
-  unsigned long sharedram;
-  unsigned long bufferram;
-  unsigned long totalswap;
-  unsigned long freeswap;
-  unsigned short procs;
-  unsigned short pad;
-  unsigned long totalhigh;
-  unsigned long freehigh;
-  unsigned mem_unit;
-  char __reserved[256];
+  unsigned long uptime;    /* Seconds since boot */
+  unsigned long loads[3];  /* 1, 5, and 15 minute load averages */
+  unsigned long totalram;  /* Total usable main memory size */
+  unsigned long freeram;   /* Available memory size */
+  unsigned long sharedram; /* Amount of shared memory */
+  unsigned long bufferram; /* Memory used by buffers */
+  unsigned long totalswap; /* Total swap space size */
+  unsigned long freeswap;  /* Swap space still available */
+  unsigned short procs;    /* Number of current processes */
+  unsigned short pad;      /* Padding for alignment */
+  unsigned long totalhigh; /* Total high memory size */
+  unsigned long freehigh;  /* Available high memory size */
+  unsigned mem_unit;       /* Memory unit size in bytes */
 };
 
 /****************************************************************************

Reply via email to