gnu: jsonnet: Fix build with newer gcc.

* gnu/packages/patches/jsonnet-include-cstdint-for-gcc-13-builds.patch:
New file.
* gnu/packages/cpp.scm (jsonnet): Use patch.
* gnu/local.mk (dist_patch_DATA): Reference new patch file.

Change-Id: Ib2f1ea6b8346ca9c7d887cbf14b476be1d476f42
Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
François Joulaud 2025-11-14 16:31:41 +01:00 committed by Andreas Enge
parent fc8c061ecf
commit 9c19e0cf36
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3
3 changed files with 31 additions and 1 deletions

View file

@ -1647,8 +1647,9 @@ dist_patch_DATA = \
%D%/packages/patches/jfsutils-gcc-compat.patch \
%D%/packages/patches/jfsutils-include-systypes.patch \
%D%/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch \
%D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \
%D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \
%D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \
%D%/packages/patches/jsonnet-include-cstdint-for-gcc-13-builds.patch \
%D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \
%D%/packages/patches/julia-Use-MPFR-4.2.patch \
%D%/packages/patches/komikku-python-3.11-compat.patch \

View file

@ -3167,6 +3167,7 @@ of reading and writing XML.")
(sha256
(base32 "1ddz14699v5lqx3dh0mb7hfffr6fk5zhmzn3z8yxkqqvriqnciim"))
(modules '((guix build utils)))
(patches (search-patches "jsonnet-include-cstdint-for-gcc-13-builds.patch"))
(snippet
#~(begin
(rename-file "third_party/md5" ".md5")

View file

@ -0,0 +1,28 @@
From e43ca8e958d129094bec58fe06a87be1358aaf42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?W=C3=81NG=20Xu=C4=9Bru=C3=AC?=
<1175567+xen0n@users.noreply.github.com>
Date: Wed, 19 Oct 2022 11:15:43 +0800
Subject: [PATCH] Add #include <cstdint> for gcc-13 builds (#1020)
See https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes.
This fixes Gentoo bug https://bugs.gentoo.org/875569.
---
include/libjsonnet++.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/libjsonnet++.h b/include/libjsonnet++.h
index b744b31..ed14f31 100644
--- a/include/libjsonnet++.h
+++ b/include/libjsonnet++.h
@@ -17,6 +17,7 @@ limitations under the License.
#ifndef CPP_JSONNET_H_
#define CPP_JSONNET_H_
+#include <cstdint>
#include <cstring>
#include <functional>
#include <map>
--
2.51.0