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 <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-02-08 16:15:48 +08:00 committed by Xiang Xiao
parent 8761cc9bfc
commit 86aed87487

View File

@ -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 */
};
/****************************************************************************