mirror of
https://github.com/thunderbrewhq/common.git
synced 2025-12-12 03:02:29 +00:00
fix(processor): sysctlbyname uses size_t length
This commit is contained in:
parent
339f9018d4
commit
a2c5663601
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ uint32_t OsGetProcessorFeaturesEx(int32_t& vendorID) {
|
||||||
features = 0x80000000;
|
features = 0x80000000;
|
||||||
|
|
||||||
int32_t feature;
|
int32_t feature;
|
||||||
int32_t length;
|
size_t length;
|
||||||
|
|
||||||
length = sizeof(feature);
|
length = sizeof(feature);
|
||||||
if (sysctlbyname("hw.optional.mmx", &feature, &length, nullptr, 0) == 0 && feature) {
|
if (sysctlbyname("hw.optional.mmx", &feature, &length, nullptr, 0) == 0 && feature) {
|
||||||
|
|
@ -55,4 +55,4 @@ uint64_t OsGetProcessorTicksPerSecond() {
|
||||||
return 1000ULL;
|
return 1000ULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue