ext/asyncengine/libuv/src/unix/darwin.c in asyncengine-0.0.1.testing1 vs ext/asyncengine/libuv/src/unix/darwin.c in asyncengine-0.0.2.alpha1
- old
+ new
@@ -209,10 +209,11 @@
mach_msg_type_number_t msg_type;
processor_cpu_load_info_data_t *info;
uv_cpu_info_t* cpu_info;
size = sizeof(model);
- if (sysctlbyname("hw.model", &model, &size, NULL, 0) < 0) {
+ if (sysctlbyname("machdep.cpu.brand_string", &model, &size, NULL, 0) < 0 &&
+ sysctlbyname("hw.model", &model, &size, NULL, 0) < 0) {
return uv__new_sys_error(errno);
}
size = sizeof(cpuspeed);
if (sysctlbyname("hw.cpufrequency", &cpuspeed, &size, NULL, 0) < 0) {
return uv__new_sys_error(errno);