]> git.pld-linux.org Git - packages/gdal.git/commitdiff
upstream fixes for gcc 11
authorJan Palus <atler@pld-linux.org>
Fri, 25 Jun 2021 12:34:46 +0000 (12:34 +0000)
committerJan Palus <atler@pld-linux.org>
Fri, 25 Jun 2021 12:34:46 +0000 (12:34 +0000)
missing "limits" includes

gcc11.patch [new file with mode: 0644]
gdal.spec

diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644 (file)
index 0000000..0f87318
--- /dev/null
@@ -0,0 +1,48 @@
+From 7a18e2669a733ebe3544e4f5c735fd4d2ded5fa3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder@redhat.com>
+Date: Thu, 10 Dec 2020 14:02:44 +0100
+Subject: [PATCH] Add some missing <limits> includes
+
+Otherwise, the builds fails with either gcc11 or recent clang.
+---
+ gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp | 1 +
+ gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp  | 1 +
+ gdal/third_party/LercLib/Lerc2.h                   | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+index f59f7d50e2f5..edff5100e1f4 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+@@ -31,6 +31,7 @@
+ #include "cadobjects.h"
++#include <limits>
+ #include <math.h>
+ #include <algorithm>
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+index 83951fd7e7fc..6ae837da6467 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+@@ -36,6 +36,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <iostream>
++#include <limits>
+ #include <memory>
+ #include <string>
+diff --git a/gdal/third_party/LercLib/Lerc2.h b/gdal/third_party/LercLib/Lerc2.h
+index feec95529c83..564f928ee672 100644
+--- a/gdal/third_party/LercLib/Lerc2.h
++++ b/gdal/third_party/LercLib/Lerc2.h
+@@ -27,6 +27,7 @@ Contributors:  Thomas Maurer
+ #include <algorithm>
+ #include <cfloat>
+ #include <cmath>
++#include <limits>
+ #include <string>
+ #include <typeinfo>
+ #include "Defines.h"
index fa2d12bf8e6f3c59fb0b18127d3c3b0c632798cf..83d8d0b6f08da7d9995eace16319d1df183735e7 100644 (file)
--- a/gdal.spec
+++ b/gdal.spec
@@ -64,6 +64,7 @@ Patch5:               libx32.patch
 Patch7:                decl.patch
 Patch8:                %{name}_tirpcinc.patch
 Patch9:                jasper.patch
+Patch10:       gcc11.patch
 URL:           http://www.gdal.org/
 # 1.x or 2.x supported
 BuildRequires: CharLS-devel
@@ -277,6 +278,7 @@ ModuĊ‚ Pythona GDAL.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p2
+%patch10 -p2
 
 # need to regenerate (old ones don't support perl 5.10)
 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
This page took 0.167597 seconds and 4 git commands to generate.