aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-07-24 14:53:45 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-07-24 16:24:38 +0200
commitdd833a4cd887bda58b8686a61287c342e9c56003 (patch)
treefc38d123ae0b9cc4cff9bb0b629269a997b06318 /src/compat.h
parent0a740650a52a21b7d82b43524017c87643af3224 (diff)
cleanup compat.h Windows stuff
- remove an unneded include for mswsock.h as we use winsock2.h anyway - move typedef u_int SOCKET; into the #ifndef WIN32 part - remove typedef int socklen_t; as this is defined in ws2tcpip.h
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compat.h b/src/compat.h
index 706221692b..4e98b46c1c 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -3,7 +3,7 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef _BITCOIN_COMPAT_H
-#define _BITCOIN_COMPAT_H 1
+#define _BITCOIN_COMPAT_H
#ifdef WIN32
#define _WIN32_WINNT 0x0501
@@ -13,7 +13,6 @@
#endif
#define FD_SETSIZE 1024 // max number of fds in fd_set
#include <winsock2.h>
-#include <mswsock.h>
#include <ws2tcpip.h>
#else
#include <sys/types.h>
@@ -26,12 +25,11 @@
#include <ifaddrs.h>
#endif
-typedef u_int SOCKET;
#ifdef WIN32
#define MSG_NOSIGNAL 0
#define MSG_DONTWAIT 0
-typedef int socklen_t;
#else
+typedef u_int SOCKET;
#include "errno.h"
#define WSAGetLastError() errno
#define WSAEINVAL EINVAL