diff options
| author | Aaron Clauson <[email protected]> | 2017-11-10 07:06:49 +1100 |
|---|---|---|
| committer | Aaron Clauson <[email protected]> | 2017-11-10 07:06:49 +1100 |
| commit | fbf327b13868861c2877c5754caf5a9816f2603c (patch) | |
| tree | c8fe180d7a8ad74859dfcf28e0f4de96eb2ab4e7 /src/compat.h | |
| parent | Merge #11580: Do not send (potentially) invalid headers in response to gethea... (diff) | |
| download | discoin-fbf327b13868861c2877c5754caf5a9816f2603c.tar.xz discoin-fbf327b13868861c2877c5754caf5a9816f2603c.zip | |
Minimal code changes to allow msvc compilation.
Diffstat (limited to 'src/compat.h')
| -rw-r--r-- | src/compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index e022659c0..09657eccb 100644 --- a/src/compat.h +++ b/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); |