Skip to content

Commit e7903f9

Browse files
committed
[benchmark] Compensate for missing header in some SDKs.
1 parent 6d32861 commit e7903f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

benchmark/utils/LibProc/LibProcIncludeSystemHeader.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
// This file exists to include the following not-yet-modularized system header:
13+
// This file exists to include the not-yet-modularized libproc.h system header.
1414

15+
#if __has_include(<libproc.h>)
1516
#include <libproc.h>
17+
#else
18+
#include <Availability.h>
19+
#include <sys/resource.h>
20+
// Some SDKs are missing the libproc.h header, despite this symbol being present.
21+
int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
22+
#endif

0 commit comments

Comments
 (0)