From ddce7c28e401d26ddf8d569f74f642ebf7b4f0b4 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 19 Jul 2017 15:10:10 +0300 Subject: [PATCH 1/2] strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers Fixes build on AppVeyor. Signed-off-by: Alexandru Ardelean --- strerror_override.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/strerror_override.h b/strerror_override.h index 48b29b3868..9b8d70aa43 100644 --- a/strerror_override.h +++ b/strerror_override.h @@ -4,10 +4,20 @@ #include "config.h" #include -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_ */ From d8fbfc7aa1766315b28aa97ca65842e6ffe8746e Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 19 Jul 2017 15:22:36 +0300 Subject: [PATCH 2/2] build,travis: drop `-enable-strerror-override` argument (no longer exists) Signed-off-by: Alexandru Ardelean --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df2014d553..1471983e91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ install: - sh autogen.sh before_script: - - ./configure --enable-strerror-override + - ./configure script: - make