From e5f3c0fc8a4f6b88fc74b35479a3ac18eeb6fa93 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 9 Jan 2018 07:20:19 +0100 Subject: [PATCH] libnm: only include "nm-jansson.h" from "nm-json.h" "nm-utils/nm-jansson.h" and thus must be included only after "nm-json.h". Enforce that by never including them directly, except from "nm-json.h" itself. --- libnm-core/nm-json.h | 2 ++ libnm-core/nm-utils.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libnm-core/nm-json.h b/libnm-core/nm-json.h index 2465ba385d..560b827ae0 100644 --- a/libnm-core/nm-json.h +++ b/libnm-core/nm-json.h @@ -44,6 +44,8 @@ gboolean nm_jansson_load (void); #define json_object_iter (*_nm_jansson_json_object_iter) #define json_integer_value (*_nm_jansson_json_integer_value) #define json_string_value (*_nm_jansson_json_string_value) + +#include "nm-utils/nm-jansson.h" #endif #endif /* __NM_JSON_H__ */ diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index f58d7942bc..efb8a9befb 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -39,7 +39,6 @@ #include "nm-json.h" #endif -#include "nm-utils/nm-jansson.h" #include "nm-utils/nm-enum-utils.h" #include "nm-common-macros.h" #include "nm-utils-private.h"