summaryrefslogtreecommitdiffstats
path: root/contrib/libs/blake2/patches/pr42-fix-build-with-win32-and-clang.patch
blob: 830d47a36efb43faef679dfced1bd6ecb9cfb2f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 48e205f0700f7f010e082aed0e273850b09b5907 Mon Sep 17 00:00:00 2001
From: Alexander Shadchin <[email protected]>
Date: Fri, 5 May 2023 15:27:59 +0300
Subject: [PATCH] Fix build with Clang

---
 src/blake2b.c | 2 +-
 src/blake2s.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/blake2b.c b/src/blake2b.c
index ca15046..c1b8e90 100644
--- a/src/blake2b.c
+++ b/src/blake2b.c
@@ -27,7 +27,7 @@
 #if defined(HAVE_SSE2)
 #include <emmintrin.h>
 // MSVC only defines  _mm_set_epi64x for x86_64...
-#if defined(_MSC_VER) && !defined(_M_X64)
+#if defined(_MSC_VER) && !defined(_M_X64) && !defined(__clang__)
 static inline __m128i _mm_set_epi64x( const uint64_t u1, const uint64_t u0 )
 {
   return _mm_set_epi32( u1 >> 32, u1, u0 >> 32, u0 );
diff --git a/src/blake2s.c b/src/blake2s.c
index 0c3636e..a05b8af 100644
--- a/src/blake2s.c
+++ b/src/blake2s.c
@@ -27,7 +27,7 @@
 #if defined(HAVE_SSE2)
 #include <emmintrin.h>
 // MSVC only defines  _mm_set_epi64x for x86_64...
-#if defined(_MSC_VER) && !defined(_M_X64)
+#if defined(_MSC_VER) && !defined(_M_X64) && !defined(__clang__)
 static inline __m128i _mm_set_epi64x( const uint64_t u1, const uint64_t u0 )
 {
   return _mm_set_epi32( u1 >> 32, u1, u0 >> 32, u0 );