diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/cloexec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 85b523885f9d..2babddaa2481 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c | |||
@@ -7,11 +7,15 @@ | |||
7 | 7 | ||
8 | static unsigned long flag = PERF_FLAG_FD_CLOEXEC; | 8 | static unsigned long flag = PERF_FLAG_FD_CLOEXEC; |
9 | 9 | ||
10 | #ifdef __GLIBC_PREREQ | ||
11 | #if !__GLIBC_PREREQ(2, 6) | ||
10 | int __weak sched_getcpu(void) | 12 | int __weak sched_getcpu(void) |
11 | { | 13 | { |
12 | errno = ENOSYS; | 14 | errno = ENOSYS; |
13 | return -1; | 15 | return -1; |
14 | } | 16 | } |
17 | #endif | ||
18 | #endif | ||
15 | 19 | ||
16 | static int perf_flag_probe(void) | 20 | static int perf_flag_probe(void) |
17 | { | 21 | { |