perf tools: Fix build break on powerpc
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Mon, 28 Mar 2016 12:31:41 +0000 (09:31 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Mar 2016 20:46:20 +0000 (17:46 -0300)
Commit 531d2410635c ("perf tools: Do not include stringify.h from the
kernel sources") seems to have accidentially removed the inclusion of
"util/header.h" from "arch/powerpc/util/header.c".

"util/header.h" provides the prototype for get_cpuid() and is needed to
build perf on Powerpc:

arch/powerpc/util/header.c:17:1: error: no previous prototype for 'get_cpuid' [-Werror=missing-prototypes]

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 531d2410635c ("perf tools: Do not include stringify.h from the kernel sources")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
[ Included "util.h" too, to get the scnprintf() prototype ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/powerpc/util/header.c

index 6138bdef6e63d9f3da37716866f2a38544c2a0c1..f8ccee132867c566dabf4bb727e9c17d78637894 100644 (file)
@@ -4,6 +4,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <linux/stringify.h>
+#include "header.h"
+#include "util.h"
 
 #define mfspr(rn)       ({unsigned long rval; \
                         asm volatile("mfspr %0," __stringify(rn) \