Skip to content

Commit 86aed87

Browse files
anchaoxiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent 8761cc9 commit 86aed87

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

include/sys/sysinfo.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@
3939

4040
struct sysinfo
4141
{
42-
unsigned long uptime;
43-
unsigned long loads[3];
44-
unsigned long totalram;
45-
unsigned long freeram;
46-
unsigned long sharedram;
47-
unsigned long bufferram;
48-
unsigned long totalswap;
49-
unsigned long freeswap;
50-
unsigned short procs;
51-
unsigned short pad;
52-
unsigned long totalhigh;
53-
unsigned long freehigh;
54-
unsigned mem_unit;
55-
char __reserved[256];
42+
unsigned long uptime; /* Seconds since boot */
43+
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
44+
unsigned long totalram; /* Total usable main memory size */
45+
unsigned long freeram; /* Available memory size */
46+
unsigned long sharedram; /* Amount of shared memory */
47+
unsigned long bufferram; /* Memory used by buffers */
48+
unsigned long totalswap; /* Total swap space size */
49+
unsigned long freeswap; /* Swap space still available */
50+
unsigned short procs; /* Number of current processes */
51+
unsigned short pad; /* Padding for alignment */
52+
unsigned long totalhigh; /* Total high memory size */
53+
unsigned long freehigh; /* Available high memory size */
54+
unsigned mem_unit; /* Memory unit size in bytes */
5655
};
5756

5857
/****************************************************************************

0 commit comments

Comments
 (0)