summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-09-02 08:44:35 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-09-02 08:44:35 +0900
commitabbd7868a0982361179e9a6f6860a877edcd7a54 (patch)
tree209536b25b7232008ecabfea996cf5df79341d54 /gnu
parent631fd912f1a7bd85a30e7c5083579b1c949d2e8a (diff)
gnu: libfyaml: Fix build on 32bit architectures.gnome-team
* gnu/packages/patches/libfyaml-vlsize-32bit-fixes.patch: New file. * gnu/packages/serialization.scm (libfyaml) [source]: Apply patch. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/libfyaml-vlsize-32bit-fixes.patch36
-rw-r--r--gnu/packages/serialization.scm3
3 files changed, 39 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 2728cbc2e87..1a8720459de 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1805,6 +1805,7 @@ dist_patch_DATA = \
1805 %D%/packages/patches/libcyaml-libyaml-compat.patch \ 1805 %D%/packages/patches/libcyaml-libyaml-compat.patch \
1806 %D%/packages/patches/libexpected-use-provided-catch2.patch \ 1806 %D%/packages/patches/libexpected-use-provided-catch2.patch \
1807 %D%/packages/patches/libfaketime-32bit.patch \ 1807 %D%/packages/patches/libfaketime-32bit.patch \
1808 %D%/packages/patches/libfyaml-vlsize-32bit-fixes.patch \
1808 %D%/packages/patches/libgda-CVE-2021-39359.patch \ 1809 %D%/packages/patches/libgda-CVE-2021-39359.patch \
1809 %D%/packages/patches/libgda-disable-data-proxy-test.patch \ 1810 %D%/packages/patches/libgda-disable-data-proxy-test.patch \
1810 %D%/packages/patches/libgda-fix-build.patch \ 1811 %D%/packages/patches/libgda-fix-build.patch \
diff --git a/gnu/packages/patches/libfyaml-vlsize-32bit-fixes.patch b/gnu/packages/patches/libfyaml-vlsize-32bit-fixes.patch
new file mode 100644
index 00000000000..90d388a74da
--- /dev/null
+++ b/gnu/packages/patches/libfyaml-vlsize-32bit-fixes.patch
@@ -0,0 +1,36 @@
1Combined diffs of commits https://github.com/pantoniou/libfyaml/commit/0982fcefc6a16d4c8cb5b06747d3fc8e630de3ae.diff and https://github.com/pantoniou/libfyaml/commit/9192deaac095f9881cc1e5756dede683f36b09d6.diff.
2
3Upstream-status: <https://github.com/pantoniou/libfyaml/issues/328>
4
5diff --git a/include/libfyaml/libfyaml-vlsize.h b/include/libfyaml/libfyaml-vlsize.h
6index 6ccb7ab1..1b950c4c 100644
7--- a/include/libfyaml/libfyaml-vlsize.h
8+++ b/include/libfyaml/libfyaml-vlsize.h
9@@ -816,5 +816,5 @@ fy_decode_size_nocheck(const uint8_t *start, size_t *sizep)
10 static inline const uint8_t *
11 fy_skip_size(const uint8_t *start, size_t bufsz)
12 {
13- return fy_skip_size32(start, bufsz, &sz);
14+ return fy_skip_size32(start, bufsz);
15 }
16
17 static inline const uint8_t *
18
19diff --git a/include/libfyaml/libfyaml-vlsize.h b/include/libfyaml/libfyaml-vlsize.h
20index 1b950c4c..acfd78d3 100644
21--- a/include/libfyaml/libfyaml-vlsize.h
22+++ b/include/libfyaml/libfyaml-vlsize.h
23@@ -810,5 +810,10 @@ fy_decode_size(const uint8_t *start, size_t bufsz, size_t *sizep)
24 static inline const uint8_t *
25 fy_decode_size_nocheck(const uint8_t *start, size_t *sizep)
26 {
27- return fy_decode_size32_nocheck(start, sizep);
28+ uint64_t sz;
29+ const uint8_t *ret;
30+
31+ ret = fy_decode_size32_nocheck(start, &sz);
32+ *sizep = (size_t)sz;
33+ return ret;
34 }
35
36 static inline const uint8_t *
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 06166d825ad..7571ef2b0c7 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -482,7 +482,8 @@ in which the loaded data is arranged in memory.")
482 (commit (string-append "v" version)))) 482 (commit (string-append "v" version))))
483 (file-name (git-file-name name version)) 483 (file-name (git-file-name name version))
484 (sha256 484 (sha256
485 (base32 "1hrp1vaa1f192krrvkmmfr9rsladzpm5jgxjzpnx5hkrw9xi054r")))) 485 (base32 "1hrp1vaa1f192krrvkmmfr9rsladzpm5jgxjzpnx5hkrw9xi054r"))
486 (patches (search-patches "libfyaml-vlsize-32bit-fixes.patch"))))
486 (build-system gnu-build-system) 487 (build-system gnu-build-system)
487 (native-inputs 488 (native-inputs
488 (list autoconf 489 (list autoconf