Browse Source

MSVS fix.

djm34
troky 10 years ago
parent
commit
4ced43ba2b
  1. 5
      algorithm/neoscrypt.c
  2. 2
      miner.h
  3. 6
      winbuild/dist/include/config.h

5
algorithm/neoscrypt.c

@ -1177,7 +1177,8 @@ void neoscrypt(const uchar *password, uchar *output, uint profile) {
r = (1 << ((profile >> 5) & 0x7)); r = (1 << ((profile >> 5) & 0x7));
} }
uchar stack[(N + 3) * r * 2 * SCRYPT_BLOCK_SIZE + stack_align]; uchar *stack;
stack = (uchar *)malloc((N + 3) * r * 2 * SCRYPT_BLOCK_SIZE + stack_align);
/* X = r * 2 * SCRYPT_BLOCK_SIZE */ /* X = r * 2 * SCRYPT_BLOCK_SIZE */
X = (uint *) &stack[stack_align & ~(stack_align - 1)]; X = (uint *) &stack[stack_align & ~(stack_align - 1)];
/* Z is a copy of X for ChaCha */ /* Z is a copy of X for ChaCha */
@ -1284,7 +1285,7 @@ void neoscrypt(const uchar *password, uchar *output, uint profile) {
#endif #endif
} }
free(stack);
} }
void neoscrypt_regenhash(struct work *work) void neoscrypt_regenhash(struct work *work)

2
miner.h

@ -1491,7 +1491,7 @@ extern void kill_work(void);
//helper macro to preserve existing code //helper macro to preserve existing code
#ifndef switch_pools #ifndef switch_pools
#define switch_pools(p) __switch_pools(p, TRUE) #define switch_pools(p) __switch_pools(p, true)
#endif #endif
extern void __switch_pools(struct pool *selected, bool saveprio); extern void __switch_pools(struct pool *selected, bool saveprio);

6
winbuild/dist/include/config.h vendored

@ -67,11 +67,11 @@
#endif #endif
#define VERSION "v5.0.1" #define VERSION "v5.1.0"
#define PACKAGE_NAME "sgminer" #define PACKAGE_NAME "sgminer"
#define PACKAGE_TARNAME "sgminer" #define PACKAGE_TARNAME "sgminer"
#define PACKAGE_VERSION "5.0.1" #define PACKAGE_VERSION "5.1.0"
#define PACKAGE_STRING "sgminer 5.0.1" #define PACKAGE_STRING "sgminer 5.1.0"
#define PACKAGE "sgminer" #define PACKAGE "sgminer"
#define SGMINER_PREFIX "" #define SGMINER_PREFIX ""

Loading…
Cancel
Save