From a742f44cb79113bab2733d9729b15aba0fa4ac0c Mon Sep 17 00:00:00 2001 From: David Terei Date: Thu, 11 Dec 2014 21:04:26 -0800 Subject: [PATCH] fix non linux support --- mutilate.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mutilate.cc b/mutilate.cc index d18473e..426fd05 100644 --- a/mutilate.cc +++ b/mutilate.cc @@ -660,7 +660,9 @@ void go(const vector& servers, options_t& options, vector ts[options.threads]; #endif +#ifdef __linux__ int current_cpu = -1; +#endif for (int t = 0; t < options.threads; t++) { td[t].options = &options; @@ -683,6 +685,7 @@ void go(const vector& servers, options_t& options, pthread_attr_t attr; pthread_attr_init(&attr); +#ifdef __linux__ if (args.affinity_given) { int max_cpus = 8 * sizeof(cpu_set_t); cpu_set_t m; @@ -704,6 +707,7 @@ void go(const vector& servers, options_t& options, } } } +#endif if (pthread_create(&pt[t], &attr, thread_main, &td[t])) DIE("pthread_create() failed");