From 696ea468b8c2d1061e91baa147092689a11203e6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 4 Aug 2020 15:32:29 +0200 Subject: [PATCH] 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. --- litex/build/sim/core/modules/clocker/clocker.c | 4 ++-- litex/build/sim/core/parse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.30.2