1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-02-01 01:42:59 -05:00

Change to yescrypt-best.c

This commit is contained in:
hayzamjs
2019-09-11 04:02:03 +05:30
committed by MoneroOcean
parent f694d5d9f6
commit b255cde117
2 changed files with 5 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ if (WITH_RANDOMX)
if (WIN32) if (WIN32)
set(SOURCES_CRYPTO set(SOURCES_CRYPTO
"${SOURCES_CRYPTO}" "${SOURCES_CRYPTO}"
src/crypto/defyx/yescrypt-ref.c src/crypto/defyx/yescrypt-best.c
) )
else() else()
set(SOURCES_CRYPTO set(SOURCES_CRYPTO

View File

@@ -18,7 +18,10 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifdef __unix
#include <sys/mman.h> #include <sys/mman.h>
#endif
#include <stdint.h> #include <stdint.h>
#include "yescrypt.h" #include "yescrypt.h"
@@ -76,7 +79,7 @@ alloc_region(yescrypt_region_t * region, size_t size)
#else #else
base = aligned = NULL; base = aligned = NULL;
if (size + 63 < size) { if (size + 63 < size) {
errno = ENOMEM; //errno = ENOMEM;
} else if ((base = malloc(size + 63)) != NULL) { } else if ((base = malloc(size + 63)) != NULL) {
aligned = base + 63; aligned = base + 63;
aligned -= (uintptr_t)aligned & 63; aligned -= (uintptr_t)aligned & 63;