mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 18:23:03 +01:00
Minimal code changes to allow msvc compilation.
This commit is contained in:
10
src/compat.h
10
src/compat.h
@@ -31,6 +31,7 @@
|
||||
#include <mswsock.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
@@ -71,6 +72,15 @@ typedef unsigned int SOCKET;
|
||||
#else
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#if !defined(ssize_t)
|
||||
#ifdef _WIN64
|
||||
typedef int64_t ssize_t;
|
||||
#else
|
||||
typedef int32_t ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_STRNLEN == 0
|
||||
size_t strnlen( const char *start, size_t max_len);
|
||||
|
||||
Reference in New Issue
Block a user