summaryrefslogtreecommitdiff
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorSoramichi AKIYAMA <akiyama@m.soramichi.jp>2017-01-16 18:22:37 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-01-17 17:36:45 +0300
commitd25ed5d9fad98fd36ffca0bb5c3a0761a11e3f3c (patch)
treecfb25013a0f63d563fe7414d5fc28a0490d30ba2 /tools/perf/util/header.c
parent587782c52a83b35673201fd9a54364fa2b189b33 (diff)
downloadlinux-d25ed5d9fad98fd36ffca0bb5c3a0761a11e3f3c.tar.xz
perf tools: Move two variables usied in libperf from perf.c
The use_browser and perf_version_string variables are both declared in perf.c but they are also referenced by other functions of libperf.a. Therefore a user linking an own main() with libperf.a must declare those two variables in their files even if the files never use the browser or the version information. This patch fixes this issue by moving use_browser and perf_version_string out of perf.c to some other files. Signed-off-by: Soramichi Akiyama <akiyama@m.soramichi.jp> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20170117002237.c1aec0ce3b4d675dca018deb@m.soramichi.jp Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index d89c9c7ef4e5..00fd8a8850d3 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -41,6 +41,8 @@ static const u64 __perf_magic2_sw = 0x50455246494c4532ULL;
#define PERF_MAGIC __perf_magic2
+const char perf_version_string[] = PERF_VERSION;
+
struct perf_file_attr {
struct perf_event_attr attr;
struct perf_file_section ids;