From 4b7bbab7fd5cc2e153540ed9d69e2bfc1380713d Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 00:04:17 +0000 Subject: Apply patch openexr-2.1.0-bigendian.patch patch_name: openexr-2.1.0-bigendian.patch present_in_specfile: true --- diff --git a/IlmImfTest/testFutureProofing.cpp b/IlmImfTest/testFutureProofing.cpp index 0671587..3a2ef2e 100644 --- a/IlmImfTest/testFutureProofing.cpp +++ b/IlmImfTest/testFutureProofing.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "tmpDir.h" #include "testFutureProofing.h" @@ -64,6 +65,7 @@ #include #include #include +#include namespace IMF = OPENEXR_IMF_NAMESPACE; using namespace IMF; @@ -1234,6 +1236,12 @@ modifyType (bool modify_version) //length of attribute fread(&length,4,1,f); + if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) + { + int tmp = bswap_32(length); + length = tmp; + } + if(!modify_version && attrib_name=="type") { // modify the type of part 1 to be 'X' diff --git a/IlmImfTest/testMultiPartFileMixingBasic.cpp b/IlmImfTest/testMultiPartFileMixingBasic.cpp index 1fdb631..41734ef 100644 --- a/IlmImfTest/testMultiPartFileMixingBasic.cpp +++ b/IlmImfTest/testMultiPartFileMixingBasic.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "tmpDir.h" #include "testMultiPartFileMixingBasic.h" @@ -59,6 +60,7 @@ #include #include #include +#include namespace IMF = OPENEXR_IMF_NAMESPACE; using namespace IMF; @@ -1383,6 +1385,11 @@ killOffsetTables (const std::string & fn) //length of attribute fread(&length,4,1,f); + if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) + { + int tmp = bswap_32(length); + length = tmp; + } //value of attribute for(int i=0;i