diff options
author | Moonchild <moonchild@palemoon.org> | 2022-07-01 16:58:07 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-07-01 16:58:07 +0200 |
commit | 113e84f6b222274d4992dbd6ed91800a980bfd20 (patch) | |
tree | 32f3b03c682721ffe4098c8e0a041603e3b0637b /mfbt/Compression.cpp | |
parent | 1e25e4d7aa8497dda463fb1ca000f64e2393c8fa (diff) | |
download | uxp-113e84f6b222274d4992dbd6ed91800a980bfd20.tar.gz |
Issue #1817 - Include <intrin.h> at top-level before lz4.c can includeVS2017
it in a namespace.
BZ Bug 1345331
Diffstat (limited to 'mfbt/Compression.cpp')
-rw-r--r-- | mfbt/Compression.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mfbt/Compression.cpp b/mfbt/Compression.cpp index 6147d0d611..f1855ba2e7 100644 --- a/mfbt/Compression.cpp +++ b/mfbt/Compression.cpp @@ -11,6 +11,15 @@ // corecrt_memory.h. #include <string> +// Because we wrap lz4.c in an anonymous namespace, all of its #includes +// go in the anonymous namespace too. This would create conflicting +// declarations for intrinsic functions that are internally defined +// at top-level. Including intrin.h here prevents it from being included +// later within the anonymous namespace. +#ifdef _MSC_VER +#include <intrin.h> +#endif + using namespace mozilla::Compression; namespace { |