diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc index 9e41a421..ed1c4164 100644 --- a/src/core/cpuinfo.cc +++ b/src/core/cpuinfo.cc @@ -465,13 +465,13 @@ string value) if (id == "model name") cpu->setProduct(value); if (id == "microcode") - cpu->setConfig(id, stoll(value, NULL, 0)); + cpu->setConfig(id, strtoll(value.c_str(), NULL, 0)); if (id == "cpu family") - cpu->addHint(id, stoll(value, NULL, 0)); + cpu->addHint(id, strtoll(value.c_str(), NULL, 0)); if (id == "model") - cpu->addHint(id, stoll(value, NULL, 0)); + cpu->addHint(id, strtoll(value.c_str(), NULL, 0)); if (id == "stepping") - cpu->addHint(id, stoll(value, NULL, 0)); + cpu->addHint(id, strtoll(value.c_str(), NULL, 0)); family = cpu->getHint("cpu family"); model = cpu->getHint("model"); diff --git a/src/core/hw.cc b/src/core/hw.cc index 1c1dad46..b266a863 100644 --- a/src/core/hw.cc +++ b/src/core/hw.cc @@ -2459,7 +2459,7 @@ long long value::asInteger() const switch(This->type) { case hw::text: - return stoll(This->s, NULL, 0); + return strtoll(This->s.c_str(), NULL, 0); case hw::integer: return This->ll; case hw::boolean: diff --git a/src/core/spd.cc b/src/core/spd.cc index a304d061..207b3ba6 100644 --- a/src/core/spd.cc +++ b/src/core/spd.cc @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include