mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 10:30:52 +00:00
Minimal code changes to allow msvc compilation.
-add msvc ssize_t definition in compat.h -change NUM_OS_RANDOM_BYTES to int from ssize_t in random.h Includes squashed commit: f7dc99244c8e78dbd0196f612690efcc449c37dc Inspired by: fbf327b13868861c2877c5754caf5a9816f2603c
This commit is contained in:
parent
90d1972d81
commit
3606c85c7d
@ -75,6 +75,12 @@ typedef u_int SOCKET;
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
|
||||
// ssize_t is POSIX, and not present when using MSVC.
|
||||
#ifdef _MSC_VER
|
||||
#include <BaseTsd.h>
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
|
||||
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
|
||||
@ -121,7 +121,7 @@ public:
|
||||
* sure that the underlying OS APIs for all platforms support the number.
|
||||
* (many cap out at 256 bytes).
|
||||
*/
|
||||
static const ssize_t NUM_OS_RANDOM_BYTES = 32;
|
||||
static const int NUM_OS_RANDOM_BYTES = 32;
|
||||
|
||||
/** Get 32 bytes of system entropy. Do not use this in application code: use
|
||||
* GetStrongRandBytes instead.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user