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

Commit

Permalink
Fix compilation of sanitizers on Linux
Browse files Browse the repository at this point in the history
Dunno why it's necessary, but seems not bad? Who knows!
  • Loading branch information
alexcrichton committed Jan 25, 2018
1 parent bd2cfdd commit dfd960b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions lib/sanitizer_common/sanitizer_linux_libcdep.cc
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,8 @@ u32 GetNumberOfCPUs() {
}
internal_close(fd);
return n_cpus;
#elif SANITIZER_SOLARIS
return sysconf(_SC_NPROCESSORS_ONLN);
#else
cpu_set_t CPUs;
CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0);
return CPU_COUNT(&CPUs);
return sysconf(_SC_NPROCESSORS_ONLN);
#endif
}

Expand Down
1 change: 1 addition & 0 deletions lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ typedef struct user_fpregs elf_fpregset_t;
#endif

#if SANITIZER_LINUX && !SANITIZER_ANDROID
#include <stdio.h>
#include <glob.h>
#include <obstack.h>
#include <mqueue.h>
Expand Down

0 comments on commit dfd960b

Please sign in to comment.