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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
587782c52a
commit
d25ed5d9fa
@@ -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;
|
||||
|
Reference in New Issue
Block a user