diff options
author | van Hauser <vh@thc.org> | 2019-12-03 01:40:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-03 01:40:41 +0100 |
commit | 4231c498392484fd2187b9ed1dedb1ba7bc0958b (patch) | |
tree | 366586c4ceef17998670a8c2d978869bdac64d56 /src/afl-gotcpu.c | |
parent | b0d590fef4acb4b002429e4aec195e5740122494 (diff) | |
parent | ef2dc98773c55eb09e4c1a588fb74df58570f868 (diff) | |
download | afl++-4231c498392484fd2187b9ed1dedb1ba7bc0958b.tar.gz |
Merge branch 'master' into llvm_mode_build_fix
Diffstat (limited to 'src/afl-gotcpu.c')
-rw-r--r-- | src/afl-gotcpu.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/afl-gotcpu.c b/src/afl-gotcpu.c index e09f0980..c6d71bb2 100644 --- a/src/afl-gotcpu.c +++ b/src/afl-gotcpu.c @@ -52,7 +52,8 @@ #include "types.h" #include "debug.h" -#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__APPLE__) || defined(__DragonFly__) #define HAVE_AFFINITY 1 #if defined(__FreeBSD__) || defined(__DragonFly__) #include <pthread.h> @@ -69,7 +70,7 @@ #include <mach/thread_act.h> #include <mach/thread_policy.h> #endif -#endif /* __linux__ || __FreeBSD__ || __NetBSD__ || __APPLE__ */ +#endif /* __linux__ || __FreeBSD__ || __NetBSD__ || __APPLE__ */ /* Get unix time in microseconds. */ @@ -183,11 +184,11 @@ int main(int argc, char** argv) { cpuset_set(i, c); #elif defined(__APPLE__) - thread_affinity_policy_data_t c = { i }; + thread_affinity_policy_data_t c = {i}; thread_port_t native_thread = pthread_mach_thread_np(pthread_self()); if (thread_policy_set(native_thread, THREAD_AFFINITY_POLICY, - (thread_policy_t)&c, 1) != KERN_SUCCESS) - PFATAL("thread_policy_set failed"); + (thread_policy_t)&c, 1) != KERN_SUCCESS) + PFATAL("thread_policy_set failed"); #endif #if defined(__FreeBSD__) || defined(__DragonFly__) |