In json-c-0.12 is_error() is defined in bits.h which is exported via json.h. However, json-c's master branch contains commit d4e81f9ec827 which declares bits.h deprecated and removes the export via json.h.
Replace the use of is_error() with its trivial implementation to be able to get rid of this single dependency towards the deprecated bits.h.
This fixes an issue introduced by commit 17dd99c72a12 ("Clean-up header file inferno") which removed #include <json-c/bits.h> from src/rt-app_parse_config.c.
Cc: Olav Haugan ohaugan@codeaurora.org Signed-off-by: Dietmar Eggemann dietmar.eggemann@arm.com ---
Hi Juri and Vincent,
Olav had problems to build rt-app against json-c library (master ?). I didn't spot the error since I used json-c-0.12 when testing 17dd99c72a12. Can you please integrate this little snippet so we can build against master json-c as well? I didn't want to include a deprecated header file.
Cheers,
Dietmar
src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index c6086f423d2e..a6e3b591988f 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -895,7 +895,7 @@ get_opts_from_json_object(struct json_object *root, rtapp_options_t *opts) { struct json_object *global, *tasks, *resources;
- if (is_error(root)) { + if (root == NULL) { log_error(PFX "Error while parsing input JSON"); exit(EXIT_INV_CONFIG); }
On 19 February 2017 at 16:13, Dietmar Eggemann dietmar.eggemann@arm.com wrote:
In json-c-0.12 is_error() is defined in bits.h which is exported via json.h. However, json-c's master branch contains commit d4e81f9ec827 which declares bits.h deprecated and removes the export via json.h.
Replace the use of is_error() with its trivial implementation to be able to get rid of this single dependency towards the deprecated bits.h.
This fixes an issue introduced by commit 17dd99c72a12 ("Clean-up header file inferno") which removed #include <json-c/bits.h> from src/rt-app_parse_config.c.
Cc: Olav Haugan ohaugan@codeaurora.org Signed-off-by: Dietmar Eggemann dietmar.eggemann@arm.com
Acked-by: Vincent Guittot < vincent.guittot@linaro.org>
Hi Juri and Vincent,
Olav had problems to build rt-app against json-c library (master ?). I didn't spot the error since I used json-c-0.12 when testing 17dd99c72a12. Can you please integrate this little snippet so we can build against master json-c as well? I didn't want to include a deprecated header file.
Cheers,
Dietmar
src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index c6086f423d2e..a6e3b591988f 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -895,7 +895,7 @@ get_opts_from_json_object(struct json_object *root, rtapp_options_t *opts) { struct json_object *global, *tasks, *resources;
if (is_error(root)) {
if (root == NULL) { log_error(PFX "Error while parsing input JSON"); exit(EXIT_INV_CONFIG); }
-- 2.11.0
Hi,
On 27/02/17 10:31, Vincent Guittot wrote:
On 19 February 2017 at 16:13, Dietmar Eggemann dietmar.eggemann@arm.com wrote:
In json-c-0.12 is_error() is defined in bits.h which is exported via json.h. However, json-c's master branch contains commit d4e81f9ec827 which declares bits.h deprecated and removes the export via json.h.
Replace the use of is_error() with its trivial implementation to be able to get rid of this single dependency towards the deprecated bits.h.
This fixes an issue introduced by commit 17dd99c72a12 ("Clean-up header file inferno") which removed #include <json-c/bits.h> from src/rt-app_parse_config.c.
Cc: Olav Haugan ohaugan@codeaurora.org Signed-off-by: Dietmar Eggemann dietmar.eggemann@arm.com
Acked-by: Vincent Guittot < vincent.guittot@linaro.org>
Looks good to me as well. Can you please create a pull request?
Thanks,
- Juri
Hi Juri and Vincent,
Olav had problems to build rt-app against json-c library (master ?). I didn't spot the error since I used json-c-0.12 when testing 17dd99c72a12. Can you please integrate this little snippet so we can build against master json-c as well? I didn't want to include a deprecated header file.
Cheers,
Dietmar
src/rt-app_parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index c6086f423d2e..a6e3b591988f 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -895,7 +895,7 @@ get_opts_from_json_object(struct json_object *root, rtapp_options_t *opts) { struct json_object *global, *tasks, *resources;
if (is_error(root)) {
if (root == NULL) { log_error(PFX "Error while parsing input JSON"); exit(EXIT_INV_CONFIG); }
-- 2.11.0
Sched-tools mailing list Sched-tools@lists.linaro.org https://lists.linaro.org/mailman/listinfo/sched-tools