Fix GCC 13 build errors

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-05-10 12:44:56 +03:00
parent d0466952bf
commit 3b71e02323
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 43 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: endless-sky
Version: 0.9.16.1
Release: 2%{?dist}
Release: 2.0.riscv64%{?dist}
Summary: Space exploration, trading, and combat game
License: GPLv3
@ -15,6 +15,9 @@ Patch0: endless-sky-0.9.13-remove-games-path.patch
# Unset CCFLAGS override inside SConstruct.
Patch1: endless-sky-0.9.14-remove-additional-ccflags.patch
# Fix GCC 13 build errors
Patch2: sky-fix-gcc13.patch
Requires: %{name}-data = %{version}-%{release}
BuildRequires: scons
BuildRequires: gcc-c++
@ -104,6 +107,9 @@ sed -i 's|/app|%{_prefix}|g' %{buildroot}%{_bindir}/%{name}
%changelog
* Wed May 10 2023 David Abdurachmanov <davidlt@rivosinc.com> - 0.9.16.1-2.0.riscv64
- Fix GCC 13 build errors
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

36
sky-fix-gcc13.patch Normal file
View File

@ -0,0 +1,36 @@
diff --git source/ImageBuffer.h source/ImageBuffer.h
index afe4ea4..784ee25 100644
--- source/ImageBuffer.h
+++ source/ImageBuffer.h
@@ -16,6 +16,7 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef IMAGE_BUFFER_H_
#define IMAGE_BUFFER_H_
+#include <cstdint>
#include <string>
diff --git source/Preferences.h source/Preferences.h
index 04a5ad8..9eb5e05 100644
--- source/Preferences.h
+++ source/Preferences.h
@@ -16,6 +16,7 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef PREFERENCES_H_
#define PREFERENCES_H_
+#include <cstdint>
#include <string>
diff --git source/Sound.cpp source/Sound.cpp
index 6927c72..9f73c17 100644
--- source/Sound.cpp
+++ source/Sound.cpp
@@ -24,6 +24,7 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include <OpenAL/al.h>
#endif
+#include <cstdint>
#include <cstdio>
#include <vector>