diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-19 12:51:57 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-19 13:11:40 -0400 |
commit | 5e2140511c1ad9ccd731438b74d61b62111da1e6 (patch) | |
tree | a4ff748ad26e121b88469b5d921001ef1382be8f /gnu/packages/patches/libcyaml-libyaml-compat.patch | |
parent | 9e3a5ee417ea7fe9721be8804ff047e80c4f22ed (diff) | |
parent | 353bdae32f72b720c7ddd706576ccc40e2b43f95 (diff) | |
download | guix-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar.gz guix-5e2140511c1ad9ccd731438b74d61b62111da1e6.zip |
Merge branch 'staging'
Conflicts:
gnu/packages/admin.scm
gnu/packages/commencement.scm
gnu/packages/gdb.scm
gnu/packages/llvm.scm
gnu/packages/package-management.scm
gnu/packages/tls.scm
Diffstat (limited to 'gnu/packages/patches/libcyaml-libyaml-compat.patch')
-rw-r--r-- | gnu/packages/patches/libcyaml-libyaml-compat.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/patches/libcyaml-libyaml-compat.patch b/gnu/packages/patches/libcyaml-libyaml-compat.patch new file mode 100644 index 0000000000..dcb8cb51b8 --- /dev/null +++ b/gnu/packages/patches/libcyaml-libyaml-compat.patch @@ -0,0 +1,51 @@ +Fix build against libyaml 0.2.5. + +Taken from upstream: +https://github.com/tlsa/libcyaml/commit/0e947264b947f51f7ea785068637c4bfce5d4171 + +diff --git a/test/units/save.c b/test/units/save.c +--- a/test/units/save.c ++++ b/test/units/save.c +@@ -3476,7 +3476,7 @@ static bool test_save_sequence_null_values_int( + ttest_report_ctx_t *report, + const cyaml_config_t *config) + { +- static const unsigned char ref[] = ++ static const unsigned char ref1[] = + "---\n" + "- 7\n" + "- 6\n" +@@ -3487,6 +3487,18 @@ static bool test_save_sequence_null_values_int( + "- \n" + "- 0\n" + "...\n"; ++ /* As of libyaml 0.2.5, trailing spaces are not emitted. */ ++ static const unsigned char ref2[] = ++ "---\n" ++ "- 7\n" ++ "- 6\n" ++ "- 5\n" ++ "-\n" ++ "- 3\n" ++ "- 2\n" ++ "-\n" ++ "- 0\n" ++ "...\n"; + static const int d[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; + static const int *data[] = { d + 0, d + 1, d + 2, NULL, + d + 4, d + 5, NULL, d + 7, }; +@@ -3515,11 +3527,12 @@ static bool test_save_sequence_null_values_int( + return ttest_fail(&tc, cyaml_strerror(err)); + } + +- if (len != YAML_LEN(ref) || memcmp(ref, buffer, len) != 0) { ++ if ((len != YAML_LEN(ref1) || memcmp(ref1, buffer, len) != 0) && ++ (len != YAML_LEN(ref2) || memcmp(ref2, buffer, len) != 0)) { + return ttest_fail(&tc, "Bad data:\n" + "EXPECTED (%zu):\n\n%.*s\n\n" + "GOT (%zu):\n\n%.*s\n", +- YAML_LEN(ref), YAML_LEN(ref), ref, ++ YAML_LEN(ref1), YAML_LEN(ref1), ref1, + len, len, buffer); + } + |