summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-10-31 20:02:48 +0100
committerThomas Haller <thaller@redhat.com>2017-10-31 20:02:48 +0100
commit76b913a210eaebae6722b27fa7afadd4bff62a5f (patch)
treeff56085475c6aa9b264092d8611a14bd79dd3d86 /src
parentb84f63265ff07b100d3f286c6d0c06f8aaaabc22 (diff)
downloadNetworkManager-76b913a210eaebae6722b27fa7afadd4bff62a5f.tar.gz
ovs: add backward compatibility wrapper for json_object_foreach() macro
Diffstat (limited to 'src')
-rw-r--r--src/devices/ovs/nm-ovsdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c
index 166311a07c..b44668c0d3 100644
--- a/src/devices/ovs/nm-ovsdb.c
+++ b/src/devices/ovs/nm-ovsdb.c
@@ -43,6 +43,14 @@
index++)
#endif
+/* Added in Jansson v2.3 (released Jan 27 2012) */
+#ifndef json_object_foreach
+#define json_object_foreach(object, key, value) \
+ for(key = json_object_iter_key(json_object_iter(object)); \
+ key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
+ key = json_object_iter_key(json_object_iter_next(object, json_object_key_to_iter(key))))
+#endif
+
/*****************************************************************************/
typedef struct {