Patch for GCC 15 (fix RHBZ#2336266)

This commit is contained in:
Benjamin A. Beasley 2025-01-08 07:19:27 -05:00
parent 06fd1bd32e
commit f73b91d988
2 changed files with 46 additions and 1 deletions

38
1739.patch Normal file
View File

@ -0,0 +1,38 @@
From faf1b03a591f06933da02976119da5743f428e4f Mon Sep 17 00:00:00 2001
From: Christopher Fore <csfore@posteo.net>
Date: Mon, 5 Aug 2024 10:48:19 -0400
Subject: [PATCH] container/internal: Explicitly include <cstdint>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 15 will no longer include <cstdint> by default, resulting in build
failures in projects that do not explicitly include it.
Error:
absl/container/internal/container_memory.h:66:27: error: uintptr_t does not name a type
66 | assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
| ^~~~~~~~~
absl/container/internal/container_memory.h:31:1: note: uintptr_t is defined in header <cstdint>; this is probably fixable by adding #include <cstdint>
30 | #include "absl/utility/utility.h"
+++ |+#include <cstdint>
31 |
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
Signed-off-by: Christopher Fore <csfore@posteo.net>
---
absl/container/internal/container_memory.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/absl/container/internal/container_memory.h b/absl/container/internal/container_memory.h
index ba8e08a2d22..e7031797018 100644
--- a/absl/container/internal/container_memory.h
+++ b/absl/container/internal/container_memory.h
@@ -17,6 +17,7 @@
#include <cassert>
#include <cstddef>
+#include <cstdint>
#include <cstring>
#include <memory>
#include <new>

View File

@ -3,7 +3,7 @@
Name: abseil-cpp
Version: 20240722.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: C++ Common Libraries
# The entire source is Apache-2.0, except:
@ -24,6 +24,10 @@ License: Apache-2.0 AND LicenseRef-Fedora-Public-Domain
URL: https://abseil.io
Source: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz
# container/internal: Explicitly include <cstdint>
# https://github.com/abseil/abseil-cpp/pull/1739
Patch: https://github.com/abseil/abseil-cpp/pull/1739.patch
BuildRequires: cmake
# The default make backend would work just as well; ninja is observably faster
BuildRequires: ninja-build
@ -249,6 +253,9 @@ skips="${skips})$"
%{_libdir}/pkgconfig/absl_*.pc
%changelog
* Thu Jan 09 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 20240722.0-3
- Patch for GCC 15 (fix RHBZ#2336266)
* Wed Jan 08 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 20240722.0-2
- Report and skip a test regression on ppc64le