From 5697093fd4982bdd74e69db3217ae5ded3011b6e Mon Sep 17 00:00:00 2001 From: Rob Sanheim Date: Mon, 29 May 2017 23:38:11 -0500 Subject: cast for mac os support --- minethd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'minethd.cpp') diff --git a/minethd.cpp b/minethd.cpp index 59ee6cc..a72d973 100644 --- a/minethd.cpp +++ b/minethd.cpp @@ -51,7 +51,7 @@ void thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id) { #if defined(__APPLE__) thread_port_t mach_thread; - thread_affinity_policy_data_t policy = { cpu_id }; + thread_affinity_policy_data_t policy = { static_cast(cpu_id) }; mach_thread = pthread_mach_thread_np(h); thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1); #elif defined(__FreeBSD__) -- cgit v1.1