Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit dfd960b

Browse files
committed
Fix compilation of sanitizers on Linux
Dunno why it's necessary, but seems not bad? Who knows!
1 parent bd2cfdd commit dfd960b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/sanitizer_common/sanitizer_linux_libcdep.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,8 @@ u32 GetNumberOfCPUs() {
655655
}
656656
internal_close(fd);
657657
return n_cpus;
658-
#elif SANITIZER_SOLARIS
659-
return sysconf(_SC_NPROCESSORS_ONLN);
660658
#else
661-
cpu_set_t CPUs;
662-
CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0);
663-
return CPU_COUNT(&CPUs);
659+
return sysconf(_SC_NPROCESSORS_ONLN);
664660
#endif
665661
}
666662

lib/sanitizer_common/sanitizer_platform_limits_posix.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ typedef struct user_fpregs elf_fpregset_t;
137137
#endif
138138

139139
#if SANITIZER_LINUX && !SANITIZER_ANDROID
140+
#include <stdio.h>
140141
#include <glob.h>
141142
#include <obstack.h>
142143
#include <mqueue.h>

0 commit comments

Comments
 (0)