From b255cde117d7194e469dbc32668dac6fbb50a3d6 Mon Sep 17 00:00:00 2001 From: hayzamjs Date: Wed, 11 Sep 2019 04:02:03 +0530 Subject: [PATCH] Change to yescrypt-best.c --- cmake/randomx.cmake | 2 +- src/crypto/defyx/yescrypt-platform.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/randomx.cmake b/cmake/randomx.cmake index f4e65148..7f8ae958 100644 --- a/cmake/randomx.cmake +++ b/cmake/randomx.cmake @@ -59,7 +59,7 @@ if (WITH_RANDOMX) if (WIN32) set(SOURCES_CRYPTO "${SOURCES_CRYPTO}" - src/crypto/defyx/yescrypt-ref.c + src/crypto/defyx/yescrypt-best.c ) else() set(SOURCES_CRYPTO diff --git a/src/crypto/defyx/yescrypt-platform.c b/src/crypto/defyx/yescrypt-platform.c index 8f6c22ba..862a53b4 100644 --- a/src/crypto/defyx/yescrypt-platform.c +++ b/src/crypto/defyx/yescrypt-platform.c @@ -18,7 +18,10 @@ * SUCH DAMAGE. */ +#ifdef __unix #include +#endif + #include #include "yescrypt.h" @@ -76,7 +79,7 @@ alloc_region(yescrypt_region_t * region, size_t size) #else base = aligned = NULL; if (size + 63 < size) { - errno = ENOMEM; + //errno = ENOMEM; } else if ((base = malloc(size + 63)) != NULL) { aligned = base + 63; aligned -= (uintptr_t)aligned & 63;