diff --git a/src/Makefile b/src/Makefile index 168feb17c..e936a399c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -250,13 +250,11 @@ CFLAGS_CROSS_WIN32 += -I$(OPENCL_HEADERS_KHRONOS)/ CFLAGS_CROSS_WIN32 += -I$(WIN_ICONV_32)/include/ CFLAGS_CROSS_WIN32 += -m32 CFLAGS_CROSS_WIN32 += -DWITH_HWMON -CFLAGS_CROSS_WIN32 += -D_CRT_RAND_S CFLAGS_CROSS_WIN64 := $(CFLAGS) CFLAGS_CROSS_WIN64 += -I$(OPENCL_HEADERS_KHRONOS)/ CFLAGS_CROSS_WIN64 += -I$(WIN_ICONV_64)/include/ CFLAGS_CROSS_WIN64 += -m64 CFLAGS_CROSS_WIN64 += -DWITH_HWMON -CFLAGS_CROSS_WIN64 += -D_CRT_RAND_S LFLAGS_CROSS_LINUX32 := $(LFLAGS) LFLAGS_CROSS_LINUX32 += -lpthread diff --git a/src/shared.c b/src/shared.c index c49ee3ed8..e11f4df1d 100644 --- a/src/shared.c +++ b/src/shared.c @@ -381,10 +381,7 @@ u32 get_random_num (const u32 min, const u32 max) #if defined (_WIN) - u32 r; - rand_s(&r); - - return ((r % (max - min)) + min); + return (((u32) rand () % (max - min)) + min); #else