Skip to content

Commit 5dc7db8

Browse files
committed
disable unused members in struct rusage
1 parent b081da6 commit 5dc7db8

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

win32/getrusage.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ PHPAPI int getrusage(int who, struct rusage *usage)
7272
} else {
7373
return -1;
7474
}
75-
}
75+
}
76+

win32/getrusage.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ struct rusage
7070
/* Integral max resident set size */
7171
zend_long ru_maxrss;
7272

73+
/* Page faults */
74+
zend_long ru_majflt;
75+
#if 0
7376
/* Integral shared text memory size */
7477
zend_long ru_ixrss;
7578

@@ -82,9 +85,6 @@ struct rusage
8285
/* Page reclaims */
8386
zend_long ru_minflt;
8487

85-
/* Page faults */
86-
zend_long ru_majflt;
87-
8888
/* Swaps */
8989
zend_long ru_nswap;
9090

@@ -108,8 +108,10 @@ struct rusage
108108

109109
/* Involuntary context switches */
110110
zend_long ru_nivcsw;
111+
#endif
111112
};
112113

113114
PHPAPI int getrusage(int who, struct rusage *usage);
114115

115-
#endif
116+
#endif
117+

0 commit comments

Comments
 (0)