From: Florent Kermarrec Date: Tue, 4 Aug 2020 13:32:29 +0000 (+0200) Subject: build/sim: use json_object_get_int64 instead of json_object_get_uint64. X-Git-Tag: 24jan2021_ls180~31 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=696ea468b8c2d1061e91baa147092689a11203e6;p=litex.git build/sim: use json_object_get_int64 instead of json_object_get_uint64. json_object_get_uint64 does not seem supported with old json-c versions. --- diff --git a/litex/build/sim/core/modules/clocker/clocker.c b/litex/build/sim/core/modules/clocker/clocker.c index 785d0d71..92115a41 100644 --- a/litex/build/sim/core/modules/clocker/clocker.c +++ b/litex/build/sim/core/modules/clocker/clocker.c @@ -66,8 +66,8 @@ static int clocker_parse_args(struct session_s *s, const char *args) goto out; } - s->freq_hz = json_object_get_uint64(freq_json); - s->phase_deg = json_object_get_uint64(phase_json); + s->freq_hz = json_object_get_int64(freq_json); + s->phase_deg = json_object_get_int64(phase_json); if (s->freq_hz == 0) { ret = RC_JSERROR; diff --git a/litex/build/sim/core/parse.c b/litex/build/sim/core/parse.c index 5b45cb77..e0ef15a1 100644 --- a/litex/build/sim/core/parse.c +++ b/litex/build/sim/core/parse.c @@ -345,7 +345,7 @@ static int json_get_timebase(json_object *obj, uint64_t *timebase) goto out; } - _timebase = json_object_get_uint64(json_timebase); + _timebase = json_object_get_int64(json_timebase); if (_timebase == 0) { ret=RC_JSERROR;