From f9bc70234f7be785b1ac745b15104ee707ec430e Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Tue, 15 Oct 2019 12:41:45 -0700 Subject: [PATCH] Fixed for MinGW --- src/crypto/defyx/yescrypt-platform.c | 6 +++--- src/crypto/defyx/yescrypt-ref.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/crypto/defyx/yescrypt-platform.c b/src/crypto/defyx/yescrypt-platform.c index 664addb0..3a8824c9 100644 --- a/src/crypto/defyx/yescrypt-platform.c +++ b/src/crypto/defyx/yescrypt-platform.c @@ -141,10 +141,10 @@ yescrypt_init_shared(yescrypt_shared_t * shared, half1 = half2 = *shared; half1.aligned_size /= 2; -#ifdef __unix - half2.aligned += half1.aligned_size; -#else +#ifdef _MSC_VER (uint8_t*)half2.aligned += half1.aligned_size; +#else + half2.aligned += half1.aligned_size; #endif half2.aligned_size = half1.aligned_size; N /= 2; diff --git a/src/crypto/defyx/yescrypt-ref.c b/src/crypto/defyx/yescrypt-ref.c index da5fa962..9121a847 100644 --- a/src/crypto/defyx/yescrypt-ref.c +++ b/src/crypto/defyx/yescrypt-ref.c @@ -820,7 +820,11 @@ yescrypt_init_shared(yescrypt_shared_t * shared, half1 = half2 = *shared; half1.aligned_size /= 2; +#ifdef _MSC_VER (uint8_t*)half2.aligned += half1.aligned_size; +#else + half2.aligned += half1.aligned_size; +#endif half2.aligned_size = half1.aligned_size; N /= 2;