if (limit) {
n_handler_threads = limit;
} else {
- int n_proc = sysconf(_SC_NPROCESSORS_ONLN);
+ int n_proc = count_cpu_cores();
n_handler_threads = n_proc > 2 ? n_proc - 2 : 1;
}
}
ots = xcalloc(p->n_tables, sizeof *ots);
for (i = 0; i < p->n_tables; i++) {
ots[i].table_id = i;
- sprintf(ots[i].name, "table%zu", i);
+ sprintf(ots[i].name, "table%"PRIuSIZE, i);
ots[i].match = htonll(OFPXMT13_MASK);
ots[i].wildcards = htonll(OFPXMT13_MASK);
ots[i].write_actions = htonl(OFPAT11_OUTPUT);