From eb693360aca4b55128b4d423e06adfb164a3e01a Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 3 Jan 2022 16:13:34 +0100 Subject: [PATCH] Add openexr_viewers-gcc-11-fixes.patch --- openexr_viewers-gcc-11-fixes.patch | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 openexr_viewers-gcc-11-fixes.patch diff --git a/openexr_viewers-gcc-11-fixes.patch b/openexr_viewers-gcc-11-fixes.patch new file mode 100644 index 0000000..24e8334 --- /dev/null +++ b/openexr_viewers-gcc-11-fixes.patch @@ -0,0 +1,67 @@ +diff -ur openexr_viewers-2.3.0/exrdisplay/ImageView.cpp openexr_viewers-2.3.0.orig/exrdisplay/ImageView.cpp +--- openexr_viewers-2.3.0/exrdisplay/ImageView.cpp 2022-01-03 16:09:36.458801342 +0100 ++++ openexr_viewers-2.3.0.orig/exrdisplay/ImageView.cpp 2022-01-03 16:06:43.121271236 +0100 +@@ -50,6 +50,7 @@ + + #include + #include ++#include + + #if defined PLATFORM_WINDOWS || defined _WIN32 + #include +@@ -170,8 +171,8 @@ + // + // find zmax and zmin values of deep data to set bound + // +- float zmax = limits::min(); +- float zmin = limits::max(); ++ float zmax = std::numeric_limits::min(); ++ float zmin = std::numeric_limits::max(); + _maxCount = 0; + + for (int k = 0; k < _zsize; k++) +diff -ur openexr_viewers-2.3.0/exrdisplay/main.cpp openexr_viewers-2.3.0.orig/exrdisplay/main.cpp +--- openexr_viewers-2.3.0/exrdisplay/main.cpp 2022-01-03 16:09:36.460801325 +0100 ++++ openexr_viewers-2.3.0.orig/exrdisplay/main.cpp 2022-01-03 16:05:04.747106129 +0100 +@@ -69,6 +69,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -781,7 +782,7 @@ + + int lx = -1; + int ly = -1; +- float farPlane = limits::max(); //default value of zfar plane ++ float farPlane = numeric_limits::max(); //default value of zfar plane + bool deepComp = true; // attempt to composite deep images together + + // +diff -ur openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp openexr_viewers-2.3.0.orig/exrdisplay/scaleImage.cpp +--- openexr_viewers-2.3.0/exrdisplay/scaleImage.cpp 2022-01-03 16:09:36.458801342 +0100 ++++ openexr_viewers-2.3.0.orig/exrdisplay/scaleImage.cpp 2022-01-03 16:09:04.024076387 +0100 +@@ -195,8 +195,8 @@ + void + normalizePixels (int dw, int dh, Array &pixels) + { +- float pMax = -IMATH::limits::max (); +- float pMin = IMATH::limits::max (); ++ float pMax = std::numeric_limits::max (); ++ float pMin = std::numeric_limits::min (); + + for (int i = 0; i < dw * dh; ++i) + { +diff -ur openexr_viewers-2.3.0/playexr/FileReadingThread.cpp openexr_viewers-2.3.0.orig/playexr/FileReadingThread.cpp +--- openexr_viewers-2.3.0/playexr/FileReadingThread.cpp 2022-01-03 16:09:36.454801376 +0100 ++++ openexr_viewers-2.3.0.orig/playexr/FileReadingThread.cpp 2022-01-03 16:01:09.931103948 +0100 +@@ -41,6 +41,7 @@ + #include "FileReadingThread.h" + #include "fileNameForFrame.h" + #include "ImageBuffers.h" ++#include + #include + #include + #include