]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 19 Jul 2017 12:10:10 +0000 (15:10 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Wed, 19 Jul 2017 12:17:39 +0000 (15:17 +0300)
Fixes build on AppVeyor.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
strerror_override.h

index 48b29b3868917de81a67c5cf84f227be27abd497..9b8d70aa43b2eb2f84e28eb3a9fa7f9323e3529b 100644 (file)
@@ -4,10 +4,20 @@
 #include "config.h"
 #include <errno.h>
 
-char *_json_c_strerror(int errno_in);
+#include "json_object.h" /* for JSON_EXPORT */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JSON_EXPORT char *_json_c_strerror(int errno_in);
 
 #ifndef STRERROR_OVERRIDE_IMPL
 #define strerror       _json_c_strerror
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _json_strerror_override_h_ */