summaryrefslogtreecommitdiff
path: root/mfbt
diff options
context:
space:
mode:
Diffstat (limited to 'mfbt')
-rw-r--r--mfbt/Compression.cpp9
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 {