diff --git a/cpu-miner.c b/cpu-miner.c index 50973f5f0..4dd372d51 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -179,7 +179,7 @@ static int opt_scrypt_n = 1024; static int opt_pluck_n = 128; static unsigned int opt_nfactor = 6; int opt_n_threads = 0; -int opt_affinity = -1; +int64_t opt_affinity = -1L; int opt_priority = 0; int num_cpus; char *rpc_url; @@ -421,12 +421,12 @@ static inline void drop_policy(void) #define pthread_setaffinity_np(tid,sz,s) {} /* only do process affinity */ #endif -static void affine_to_cpu_mask(int id, uint8_t mask) { +static void affine_to_cpu_mask(int id, unsigned long mask) { cpu_set_t set; CPU_ZERO(&set); for (uint8_t i = 0; i < num_cpus; i++) { // cpu mask - if (mask & (1< (1< (1UL<