summaryrefslogtreecommitdiffstats
path: root/kernel/tools/perf/util/cloexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/perf/util/cloexec.c')
-rw-r--r--kernel/tools/perf/util/cloexec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/tools/perf/util/cloexec.c b/kernel/tools/perf/util/cloexec.c
index 85b523885..2babddaa2 100644
--- a/kernel/tools/perf/util/cloexec.c
+++ b/kernel/tools/perf/util/cloexec.c
@@ -7,11 +7,15 @@
static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
+#ifdef __GLIBC_PREREQ
+#if !__GLIBC_PREREQ(2, 6)
int __weak sched_getcpu(void)
{
errno = ENOSYS;
return -1;
}
+#endif
+#endif
static int perf_flag_probe(void)
{