Skip to content

Commit f096a33

Browse files
authored
Use long value fields for cpu ident on OSX
1 parent 3727672 commit f096a33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpuid_arm64.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ int detect(void)
267267
}
268268
#else
269269
#ifdef __APPLE__
270-
sysctlbyname("hw.cpufamily",&value,&length,NULL,0);
271-
if (value ==131287967|| value == 458787763 ) return CPU_VORTEX; //A12/M1
272-
if (value == 3660830781) return CPU_VORTEX; //A15/M2
270+
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
271+
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
272+
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
273273
#endif
274274
return CPU_ARMV8;
275275
#endif

0 commit comments

Comments
 (0)