From 6b739fc8212c46675d33701d2bf921f343b01619 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 24 Jul 2016 02:13:22 +0200 Subject: [PATCH] Fix VS2010 (and VC9) x64 build --- .../crypto_generichash/blake2/ref/blake2b-compress-avx2.c | 2 +- src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c b/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c index e489e866a4..d84e654b3f 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c @@ -7,7 +7,7 @@ #include #if (defined(HAVE_AVX2INTRIN_H) && defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H) && defined(HAVE_SMMINTRIN_H)) || \ - (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) + (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64)) && _MSC_VER > 1600) #pragma GCC target("sse2") #pragma GCC target("ssse3") diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c index 924c90af64..0ace7507f5 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c @@ -429,7 +429,7 @@ blake2b_pick_best_implementation(void) { /* LCOV_EXCL_START */ #if (defined(HAVE_AVX2INTRIN_H) && defined(HAVE_TMMINTRIN_H) && defined(HAVE_SMMINTRIN_H)) || \ - (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) + (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64)) && _MSC_VER > 1600) if (sodium_runtime_has_avx2()) { blake2b_compress = blake2b_compress_avx2; return 0;