Skip to content

Commit 7b78f13

Browse files
Markus TrippelsdorfIngo Molnar
authored andcommitted
perf tools: Fix getrusage() related build failure on glibc trunk
On a system running glibc trunk perf doesn't build: CC builtin-sched.o builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration] [...] Fix it by including sys/resource.h. Signed-off-by: Markus Trippelsdorf <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/20120404084527.GA294@x4 Signed-off-by: Ingo Molnar <[email protected]>
1 parent 7b8e6da commit 7b78f13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/builtin-sched.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "util/debug.h"
1818

1919
#include <sys/prctl.h>
20+
#include <sys/resource.h>
2021

2122
#include <semaphore.h>
2223
#include <pthread.h>

0 commit comments

Comments
 (0)