aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-12 18:46:40 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-12 20:33:52 +0100
commit11f87d635ce73f7d69ed4b1bdca77df1a7406eb5 (patch)
tree1eaeafb9aa867f3573c29c617dab173f2f353d03 /gnu/packages
parent7dadffff8dec4cd4756e45ea60992de73dac4fc8 (diff)
downloadguix-11f87d635ce73f7d69ed4b1bdca77df1a7406eb5.tar.gz
guix-11f87d635ce73f7d69ed4b1bdca77df1a7406eb5.zip
gnu: jsoncpp: Fix test failure on armhf-linux and aarch64-linux.
* gnu/packages/patches/jsoncpp-fix-inverted-case.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/serialization.scm (jsoncpp)[source](patches): New field.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/jsoncpp-fix-inverted-case.patch22
-rw-r--r--gnu/packages/serialization.scm1
2 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch b/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
new file mode 100644
index 0000000000..e4897de1b8
--- /dev/null
+++ b/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
@@ -0,0 +1,22 @@
+This patch fixes a bug and related test failure on platforms where 'char'
+is unsigned.
+
+Taken from upstream:
+https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 8e06cca2..56195dc1 100644
+--- a/src/lib_json/json_writer.cpp
++++ b/src/lib_json/json_writer.cpp
+@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
+
+ char const* const end = s + n;
+ for (char const* cur = s; cur < end; ++cur) {
+- if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
+- static_cast<unsigned char>(*cur) < 0x80)
++ if (*cur == '\\' || *cur == '\"' ||
++ static_cast<unsigned char>(*cur) < ' ' ||
++ static_cast<unsigned char>(*cur) >= 0x80)
+ return true;
+ }
+ return false;
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index cf80237f11..72cc70e3c4 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -290,6 +290,7 @@ that implements both the msgpack and msgpack-rpc specifications.")
(method git-fetch)
(uri (git-reference (url home-page) (commit version)))
(file-name (git-file-name name version))
+ (patches (search-patches "jsoncpp-fix-inverted-case.patch"))
(sha256
(base32
"037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))