diff options
author | Marcus Geelnard <marcus.geelnard@smarteye.se> | 2019-05-08 14:59:06 +0200 |
---|---|---|
committer | m <m@bitsnbites.eu> | 2019-08-09 11:49:02 +0200 |
commit | 85fee2565364cb31b72252a07538c97a52e48ca7 (patch) | |
tree | b904ce3f24c9cd974abe14ffede8c2eaf1ffad6a /sockcompat.h | |
parent | 3af99d5fd5c2352cd73e851686bb18de122897f1 (diff) |
MinGW fix: Use _MSC_VER instead of _WIN32 where appropriate
Use _MSC_VER (instead of _WIN32) for things that are specific for
Visual Studio.
Also remove #include <winsock2.h> from hiredis.h, as it leaks too
many symbols and defines into the global namespace, which is
undesirable for a public interface header. Anyone who uses the
the affected parts of the hiredis API needs to include the
appropriate headers anyway in order to declare struct timeval
variables.
Diffstat (limited to 'sockcompat.h')
-rw-r--r-- | sockcompat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sockcompat.h b/sockcompat.h index e0b2e5e..56006c1 100644 --- a/sockcompat.h +++ b/sockcompat.h @@ -50,7 +50,9 @@ #include <ws2tcpip.h> #include <stddef.h> +#ifdef _MSC_VER typedef signed long ssize_t; +#endif /* Emulate the parts of the BSD socket API that we need (override the winsock signatures). */ int win32_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); |