提交 a9072bc0 编写于 作者: A Arnaldo Carvalho de Melo

perf header: Fix build on old systems

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: NIngo Molnar <mingo@elte.hu>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-alfra9wao63euguj7gr8jw7e@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 4610e413
#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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册