summaryrefslogtreecommitdiff
path: root/src/net/tcp.h
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-04-01 18:56:48 +0200
committerTomas Chvatal <scarabeus@gentoo.org>2009-04-01 18:56:48 +0200
commit0000dafcac4f161f931acfd240024b9f435178ad (patch)
tree373e401f2918a172f2c37338c1423ec30ac2654c /src/net/tcp.h
parent88758825bd156e18bd00b0876ea1a0ecf893f140 (diff)
Make tcp compilable on windows
Diffstat (limited to 'src/net/tcp.h')
-rw-r--r--src/net/tcp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net/tcp.h b/src/net/tcp.h
index 4a3b326..ae46f48 100644
--- a/src/net/tcp.h
+++ b/src/net/tcp.h
@@ -4,17 +4,25 @@
# define MY_TCP_H
# include "main.h"
+# ifndef __WIN32__
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/tcp.h>
-
+# else
+# include <windows.h>
+# include <wininet.h>
+# endif
# define SUPPORT_IPv6
# define PROTO_TCPv4 0
# define PROTO_TCPv6 1
typedef struct struct_sock_tcp_t {
+# ifndef __WIN32_
int sock;
+# else
+ SOCKET sock;
+# endif
int proto;
struct sockaddr_in sockAddr;