forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libheif] Fix compilation errors using gcc8 (microsoft#42869)
- Loading branch information
1 parent
89b92ea
commit 8906f18
Showing
5 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/libheif/bitstream.cc b/libheif/bitstream.cc | ||
index 9063718..f459fcc 100644 | ||
--- a/libheif/bitstream.cc | ||
+++ b/libheif/bitstream.cc | ||
@@ -25,6 +25,12 @@ | ||
#include <cassert> | ||
#include <bit> | ||
|
||
+#if ((defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__PGI)) && __GNUC__ < 9) || (defined(__clang__) && __clang_major__ < 10) | ||
+#include <type_traits> | ||
+#else | ||
+#include <bit> | ||
+#endif | ||
+ | ||
#define MAX_UVLC_LEADING_ZEROS 20 | ||
|
||
#define AVOID_FUZZER_FALSE_POSITIVE 0 | ||
diff --git a/libheif/codecs/uncompressed/decoder_abstract.cc b/libheif/codecs/uncompressed/decoder_abstract.cc | ||
index bbe4692..3c9aacd 100644 | ||
--- a/libheif/codecs/uncompressed/decoder_abstract.cc | ||
+++ b/libheif/codecs/uncompressed/decoder_abstract.cc | ||
@@ -35,6 +35,11 @@ | ||
#include "unc_codec.h" | ||
#include "decoder_abstract.h" | ||
|
||
+#if ((defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__PGI)) && __GNUC__ < 9) || (defined(__clang__) && __clang_major__ < 10) | ||
+#include <type_traits> | ||
+#else | ||
+#include <bit> | ||
+#endif | ||
|
||
AbstractDecoder::AbstractDecoder(uint32_t width, uint32_t height, const std::shared_ptr<Box_cmpd> cmpd, const std::shared_ptr<Box_uncC> uncC) : | ||
m_width(width), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters