aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-11-19 16:56:22 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-11-19 12:12:17 -0800
commit8feb8efef97a134933620071e0b6384cb3238b4e (patch)
tree1b7f3c18e7c8c17292fe84a8b4843fe14a651e97 /tools/perf/util/util.h
parentperf tools: Fix crash on synthesizing the unit (diff)
downloadlinux-dev-8feb8efef97a134933620071e0b6384cb3238b4e.tar.xz
linux-dev-8feb8efef97a134933620071e0b6384cb3238b4e.zip
tools build feature: Check if get_current_dir_name() is available
As the namespace support code will use this, which is not available in some non _GNU_SOURCE libraries such as Android's bionic used in my container build tests (r12b and r15c at the moment). Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-x56ypm940pwclwu45d7jfj47@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 14508ee7707a..ece040b799f6 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -59,6 +59,10 @@ int fetch_kernel_version(unsigned int *puint,
const char *perf_tip(const char *dirpath);
+#ifndef HAVE_GET_CURRENT_DIR_NAME
+char *get_current_dir_name(void);
+#endif
+
#ifndef HAVE_SCHED_GETCPU_SUPPORT
int sched_getcpu(void);
#endif