]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix compile for json
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 29 Sep 2016 00:35:12 +0000 (20:35 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 29 Sep 2016 00:35:12 +0000 (20:35 -0400)
When compiling with the json library instead of the json-c
library allow it to switch back to the old way of printing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/json.h

index 5dbad601a33f5f7e98dcb09f6e8245c71b28265a..c8d7fae1cd88ee75d25e9cfedb8a74942f78e427 100644 (file)
 #include <json-c/json.h>
 #else
 #include <json/json.h>
+
+/*
+ * json_object_to_json_string_ext is only available for json-c
+ * so let's just turn it back to the original usage.
+ */
+#define json_object_to_json_string_ext(A, B) json_object_to_json_string (A)
 #endif
 
 extern int use_json(const int argc, const char *argv[]);