diff options
Diffstat (limited to 'src/liblzma/common')
-rw-r--r-- | src/liblzma/common/memcmplen.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/liblzma/common/memcmplen.h b/src/liblzma/common/memcmplen.h index 5372cfa8..db3fff60 100644 --- a/src/liblzma/common/memcmplen.h +++ b/src/liblzma/common/memcmplen.h @@ -19,6 +19,16 @@ # include <immintrin.h> #endif +// Only include <intrin.h> if it is needed. The header is only needed +// on Windows when using an MSVC compatible compiler. The Intel compiler +// can use the intrinsics without the header file. +#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \ + && (defined(_MSC_VER) \ + && defined(_M_X64) \ + && !defined(__INTEL_COMPILER)) +# include <intrin.h> +#endif + /// Find out how many equal bytes the two buffers have. /// |