-
-
Save bnoordhuis/7c33bd855c9248ec0fab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c | |
index 8c626a3..e2480f4 100644 | |
--- a/deps/uv/src/unix/sunos.c | |
+++ b/deps/uv/src/unix/sunos.c | |
@@ -344,8 +344,13 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { | |
cpu_info->model = NULL; | |
} else { | |
knp = (kstat_named_t *) kstat_data_lookup(ksp, (char *)"clock_MHz"); | |
+#if __x86_64__ | |
+ assert(knp->data_type == KSTAT_DATA_INT64); | |
+ cpu_info->speed = knp->value.i64; | |
+#else | |
assert(knp->data_type == KSTAT_DATA_INT32); | |
cpu_info->speed = knp->value.i32; | |
+#endif | |
knp = (kstat_named_t *) kstat_data_lookup(ksp, (char *)"brand"); | |
assert(knp->data_type == KSTAT_DATA_STRING); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment