diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch')
-rw-r--r-- | media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch b/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch new file mode 100644 index 000000000000..cb2660329948 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch @@ -0,0 +1,35 @@ +Blosc changed the signature of blosc_compcode_to_compname in 1.15 so +that the second parameter is now const char** not char **. This causes +compile failures when using openvdb with earlier versions of blosc. + +The fix, which is backported from openvdb-7, is to check the blosc +version and cast the char** to const char** for modern versions of +blosc. + +The bug can be produced by emerging blosc 1.15+, and then openvdb. +Without this patch, the compiler will fail with +error: invalid conversion from ‘char**’ to ‘const char**’ + +To test that the patch has been properly implemented, emerge modern +blosc and then openvdb with this patch, and the compile will succeed. + +Fixes bug https://bugs.gentoo.org/734102 +Upstream commit https://github.com/AcademySoftwareFoundation/openvdb/commit/d2e8bd87a63d1e9f66a558ecbb6e6cbd54f7de13 + +diff -Naur a/openvdb/unittest/TestFile.cc b/openvdb/unittest/TestFile.cc +--- a/openvdb/unittest/TestFile.cc 2020-08-19 02:11:48.945711312 +1000 ++++ b/openvdb/unittest/TestFile.cc 2020-08-19 02:13:31.106074899 +1000 +@@ -2666,7 +2666,12 @@ + + for (int compcode = 0; compcode <= BLOSC_ZLIB; ++compcode) { + char* compname = nullptr; +- if (0 > blosc_compcode_to_compname(compcode, &compname)) continue; ++#if BLOSC_VERSION_MAJOR > 1 || (BLOSC_VERSION_MAJOR == 1 && BLOSC_VERSION_MINOR >= 15) ++ if (0 > blosc_compcode_to_compname(compcode, const_cast<const char**>(&compname))) ++#else ++ if (0 > blosc_compcode_to_compname(compcode, &compname)) ++#endif ++ continue; + /// @todo This changes the compressor setting globally. + if (blosc_set_compressor(compname) < 0) continue; + |