Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created August 16, 2012 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/7c33bd855c9248ec0fab to your computer and use it in GitHub Desktop.
Save bnoordhuis/7c33bd855c9248ec0fab to your computer and use it in GitHub Desktop.
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