From 113e84f6b222274d4992dbd6ed91800a980bfd20 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 1 Jul 2022 16:58:07 +0200 Subject: Issue #1817 - Include at top-level before lz4.c can include it in a namespace. BZ Bug 1345331 --- mfbt/Compression.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 +// 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 +#endif + using namespace mozilla::Compression; namespace { -- cgit v1.2.3