Add upstream patch to add missing include needed for gcc 13

This commit is contained in:
Orion Poplawski 2023-01-22 19:33:22 -07:00
parent 1c6e0056f7
commit e58fcd24f0
2 changed files with 28 additions and 2 deletions

21
gdal-include.patch Normal file
View File

@ -0,0 +1,21 @@
From 412b7fe6604141ee371f5a5a628bab1c5304de76 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 17 Jan 2023 13:39:05 +0100
Subject: [PATCH] testcopywords.cpp: fix build error with clang 15.0.7
---
autotest/cpp/testcopywords.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/autotest/cpp/testcopywords.cpp b/autotest/cpp/testcopywords.cpp
index a59d9bf91a3..07a0f448c69 100644
--- a/autotest/cpp/testcopywords.cpp
+++ b/autotest/cpp/testcopywords.cpp
@@ -30,6 +30,7 @@
#include "cpl_conv.h"
#include "gdal.h"
+#include <cstdint>
#include <iostream>
GByte *pIn;

View File

@ -75,7 +75,9 @@ Patch0: gdal_utils.patch
# inlining failed in call to always_inline open.localalias
# See https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2526 for a similar issue
Patch1: gdal-fortify-source.patch
# Add missing include needed for gcc 13
# https://github.com/OSGeo/gdal/commit/412b7fe6604141ee371f5a5a628bab1c5304de76
Patch2: gdal-include.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@ -358,7 +360,7 @@ MinGW Windows Python3 GDAL bindings.
%endif
%prep
%autosetup -p1 -n %{name}-%{version}-fedora
%autosetup -N -p1 -n %{name}-%{version}-fedora
# Delete bundled libraries
rm -rf frmts/zlib
@ -375,6 +377,9 @@ rm -rf third_party/LercLib
tar xf %{SOURCE1}
mv %{name}autotest-%{version} autotest
# Need to patch autotest
%autopatch -p1
# Copy in PROVENANCE.TXT-fedora
cp -a %{SOURCE4} .