Fix build on 32-bit systems and macOS

Apparently, on macOS, 'long' != 'int64_t'.

https://hydra.nixos.org/build/77100756
This commit is contained in:
Eelco Dolstra 2018-07-11 21:12:18 +02:00
parent efd04888ca
commit c2de2ff385
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -50,7 +50,7 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
} }
else if (t->is_value()) { else if (t->is_value()) {
if (auto val = t->as<NixInt>()) if (auto val = t->as<int64_t>())
mkInt(v, val->get()); mkInt(v, val->get());
else if (auto val = t->as<NixFloat>()) else if (auto val = t->as<NixFloat>())
mkFloat(v, val->get()); mkFloat(v, val->get());