[PATCH 11/11] perf header: Fix build on old systems
From: Arnaldo Carvalho de Melo
Date: Wed Oct 26 2011 - 13:49:21 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
For instance, on Fedora 8:
CC /home/acme/git/build/perf/util/header.o
cc1: warnings being treated as errors
util/header.c: In function âwrite_cpudescâ:
util/header.c:281: warning: implicit declaration of function âgetlineâ
util/header.c:281: warning: nested extern declaration of âgetlineâ
make: *** [/home/acme/git/build/perf/util/header.o] Error 1
make: Leaving directory `/home/acme/git/linux/tools/perf'
[acme@localhost linux]$
This happens due to header ordering, in perf util.h sets _GNU_SOURCE, so
it must come first.
Reported-by: Ingo Molnar <mingo@xxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-alfra9wao63euguj7gr8jw7e@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/header.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 76c0b2c..bcd05d0 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1,5 +1,6 @@
#define _FILE_OFFSET_BITS 64
+#include "util.h"
#include <sys/types.h>
#include <byteswap.h>
#include <unistd.h>
@@ -11,7 +12,6 @@
#include "evlist.h"
#include "evsel.h"
-#include "util.h"
#include "header.h"
#include "../perf.h"
#include "trace-event.h"
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/