diff options
Diffstat (limited to 'tools/perf/util/cloexec.c')
-rw-r--r-- | tools/perf/util/cloexec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 6da965bdbc2c..2babddaa2481 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c @@ -7,6 +7,16 @@ 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) { /* use 'safest' configuration as used in perf_evsel__fallback() */ |