All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix perf build failure on glibc trunk
@ 2012-04-04  8:45 Markus Trippelsdorf
  2012-04-04  9:46 ` Ingo Molnar
  2012-04-04 10:08 ` [tip:perf/urgent] perf tools: Fix getrusage() related " tip-bot for Markus Trippelsdorf
  0 siblings, 2 replies; 4+ messages in thread
From: Markus Trippelsdorf @ 2012-04-04  8:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Peter Zijlstra

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]
builtin-sched.c:403:2: error: nested extern declaration of ‘getrusage’ [-Werror=nested-externs]
builtin-sched.c:403:18: error: ‘RUSAGE_SELF’ undeclared (first use in this function)
builtin-sched.c:403:18: note: each undeclared identifier is reported only once for each function it appears in
builtin-sched.c:399:16: error: unused variable ‘ru’ [-Werror=unused-variable]
cc1: all warnings being treated as errors

Fix it by including sys/resource.h.
---
 tools/perf/builtin-sched.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index fb8b5f8..1cad3af 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -17,6 +17,7 @@
 #include "util/debug.h"
 
 #include <sys/prctl.h>
+#include <sys/resource.h>
 
 #include <semaphore.h>
 #include <pthread.h>
-- 
Markus

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix perf build failure on glibc trunk
  2012-04-04  8:45 [PATCH] Fix perf build failure on glibc trunk Markus Trippelsdorf
@ 2012-04-04  9:46 ` Ingo Molnar
  2012-04-04  9:55   ` Markus Trippelsdorf
  2012-04-04 10:08 ` [tip:perf/urgent] perf tools: Fix getrusage() related " tip-bot for Markus Trippelsdorf
  1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2012-04-04  9:46 UTC (permalink / raw)
  To: Markus Trippelsdorf; +Cc: linux-kernel, Ingo Molnar, Peter Zijlstra


* Markus Trippelsdorf <markus@trippelsdorf.de> wrote:

> 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]
> builtin-sched.c:403:2: error: nested extern declaration of ‘getrusage’ [-Werror=nested-externs]
> builtin-sched.c:403:18: error: ‘RUSAGE_SELF’ undeclared (first use in this function)
> builtin-sched.c:403:18: note: each undeclared identifier is reported only once for each function it appears in
> builtin-sched.c:399:16: error: unused variable ‘ru’ [-Werror=unused-variable]
> cc1: all warnings being treated as errors
> 
> Fix it by including sys/resource.h.
> ---
>  tools/perf/builtin-sched.c |    1 +
>  1 file changed, 1 insertion(+)

Can I add:

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>

?

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix perf build failure on glibc trunk
  2012-04-04  9:46 ` Ingo Molnar
@ 2012-04-04  9:55   ` Markus Trippelsdorf
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Trippelsdorf @ 2012-04-04  9:55 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Ingo Molnar, Peter Zijlstra

On 2012.04.04 at 11:46 +0200, Ingo Molnar wrote:
> 
> * Markus Trippelsdorf <markus@trippelsdorf.de> wrote:
> 
> > 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]
> > builtin-sched.c:403:2: error: nested extern declaration of ‘getrusage’ [-Werror=nested-externs]
> > builtin-sched.c:403:18: error: ‘RUSAGE_SELF’ undeclared (first use in this function)
> > builtin-sched.c:403:18: note: each undeclared identifier is reported only once for each function it appears in
> > builtin-sched.c:399:16: error: unused variable ‘ru’ [-Werror=unused-variable]
> > cc1: all warnings being treated as errors
> > 
> > Fix it by including sys/resource.h.
> > ---
> >  tools/perf/builtin-sched.c |    1 +
> >  1 file changed, 1 insertion(+)
> 
> Can I add:
> 
> Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>

Yes sure. Sorry.

-- 
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/urgent] perf tools: Fix getrusage() related build failure on glibc trunk
  2012-04-04  8:45 [PATCH] Fix perf build failure on glibc trunk Markus Trippelsdorf
  2012-04-04  9:46 ` Ingo Molnar
@ 2012-04-04 10:08 ` tip-bot for Markus Trippelsdorf
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Markus Trippelsdorf @ 2012-04-04 10:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, a.p.zijlstra, markus, tglx

Commit-ID:  7b78f13603c6fcb64e020a0bbe31a651ea2b657b
Gitweb:     http://git.kernel.org/tip/7b78f13603c6fcb64e020a0bbe31a651ea2b657b
Author:     Markus Trippelsdorf <markus@trippelsdorf.de>
AuthorDate: Wed, 4 Apr 2012 10:45:27 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 4 Apr 2012 11:59:00 +0200

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 <markus@trippelsdorf.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/builtin-sched.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index fb8b5f8..1cad3af 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -17,6 +17,7 @@
 #include "util/debug.h"
 
 #include <sys/prctl.h>
+#include <sys/resource.h>
 
 #include <semaphore.h>
 #include <pthread.h>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-04 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04  8:45 [PATCH] Fix perf build failure on glibc trunk Markus Trippelsdorf
2012-04-04  9:46 ` Ingo Molnar
2012-04-04  9:55   ` Markus Trippelsdorf
2012-04-04 10:08 ` [tip:perf/urgent] perf tools: Fix getrusage() related " tip-bot for Markus Trippelsdorf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.