From baef047b947d536c7313755423cc293e59f45c70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vladimir.cunat@nic.cz>
Date: Tue, 26 Feb 2019 16:17:26 +0100
Subject: [PATCH] contrib/ccan/json: KR_EXPORT all functions

---
 contrib/ccan/json/json.h | 43 ++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/contrib/ccan/json/json.h b/contrib/ccan/json/json.h
index ed5255e68..e63031429 100644
--- a/contrib/ccan/json/json.h
+++ b/contrib/ccan/json/json.h
@@ -24,6 +24,7 @@
 #ifndef CCAN_JSON_H
 #define CCAN_JSON_H
 
+#include <lib/defines.h>
 #include <stdbool.h>
 #include <stddef.h>
 
@@ -68,20 +69,20 @@ struct JsonNode
 
 /*** Encoding, decoding, and validation ***/
 
-JsonNode   *json_decode         (const char *json);
-char       *json_encode         (const JsonNode *node);
-char       *json_encode_string  (const char *str);
-char       *json_stringify      (const JsonNode *node, const char *space);
-void        json_delete         (JsonNode *node);
+KR_EXPORT JsonNode   *json_decode         (const char *json);
+KR_EXPORT char       *json_encode         (const JsonNode *node);
+KR_EXPORT char       *json_encode_string  (const char *str);
+KR_EXPORT char       *json_stringify      (const JsonNode *node, const char *space);
+KR_EXPORT void        json_delete         (JsonNode *node);
 
-bool        json_validate       (const char *json);
+KR_EXPORT bool        json_validate       (const char *json);
 
 /*** Lookup and traversal ***/
 
-JsonNode   *json_find_element   (JsonNode *array, int index);
-JsonNode   *json_find_member    (JsonNode *object, const char *key);
+KR_EXPORT JsonNode   *json_find_element   (JsonNode *array, int index);
+KR_EXPORT JsonNode   *json_find_member    (JsonNode *object, const char *key);
 
-JsonNode   *json_first_child    (const JsonNode *node);
+KR_EXPORT JsonNode   *json_first_child    (const JsonNode *node);
 
 #define json_foreach(i, object_or_array)            \
 	for ((i) = json_first_child(object_or_array);   \
@@ -90,19 +91,19 @@ JsonNode   *json_first_child    (const JsonNode *node);
 
 /*** Construction and manipulation ***/
 
-JsonNode *json_mknull(void);
-JsonNode *json_mkbool(bool b);
-JsonNode *json_mkstring(const char *s);
-JsonNode *json_mknumber(double n);
-JsonNode *json_mkarray(void);
-JsonNode *json_mkobject(void);
+KR_EXPORT JsonNode *json_mknull(void);
+KR_EXPORT JsonNode *json_mkbool(bool b);
+KR_EXPORT JsonNode *json_mkstring(const char *s);
+KR_EXPORT JsonNode *json_mknumber(double n);
+KR_EXPORT JsonNode *json_mkarray(void);
+KR_EXPORT JsonNode *json_mkobject(void);
 
-void json_append_element(JsonNode *array, JsonNode *element);
-void json_prepend_element(JsonNode *array, JsonNode *element);
-void json_append_member(JsonNode *object, const char *key, JsonNode *value);
-void json_prepend_member(JsonNode *object, const char *key, JsonNode *value);
+KR_EXPORT void json_append_element(JsonNode *array, JsonNode *element);
+KR_EXPORT void json_prepend_element(JsonNode *array, JsonNode *element);
+KR_EXPORT void json_append_member(JsonNode *object, const char *key, JsonNode *value);
+KR_EXPORT void json_prepend_member(JsonNode *object, const char *key, JsonNode *value);
 
-void json_remove_from_parent(JsonNode *node);
+KR_EXPORT void json_remove_from_parent(JsonNode *node);
 
 /*** Debugging ***/
 
@@ -112,6 +113,6 @@ void json_remove_from_parent(JsonNode *node);
  * If a problem is detected, return false, writing a description of the problem
  * to errmsg (unless errmsg is NULL).
  */
-bool json_check(const JsonNode *node, char errmsg[256]);
+KR_EXPORT bool json_check(const JsonNode *node, char errmsg[256]);
 
 #endif
-- 
GitLab