summaryrefslogtreecommitdiffstats
path: root/libvncclient/sockets.c
diff options
context:
space:
mode:
authorVic Lee <llyzs@163.com>2009-11-04 23:18:36 +0800
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-11-10 14:22:59 +0100
commita4cc897222b8cbfb621d27c7c9f070dbbb05def9 (patch)
tree22ab803866eee61ea0982ad6e4963be88e8486f4 /libvncclient/sockets.c
parentf49a292783407c14869d811c05c2bbd009af27f7 (diff)
downloadlibtdevnc-a4cc897222b8cbfb621d27c7c9f070dbbb05def9.tar.gz
libtdevnc-a4cc897222b8cbfb621d27c7c9f070dbbb05def9.zip
Fix various compilation warnings
Signed-off-by: Vic Lee <llyzs@163.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'libvncclient/sockets.c')
-rw-r--r--libvncclient/sockets.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
index 489608f..598dd39 100644
--- a/libvncclient/sockets.c
+++ b/libvncclient/sockets.c
@@ -36,6 +36,7 @@
#define close closesocket
#define read(sock,buf,len) recv(sock,buf,len,0)
#define write(sock,buf,len) send(sock,buf,len,0)
+#define socklen_t int
#else
#include <sys/socket.h>
#include <netinet/in.h>
@@ -457,7 +458,7 @@ AcceptTcpConnection(int listenSock)
{
int sock;
struct sockaddr_in addr;
- int addrlen = sizeof(addr);
+ socklen_t addrlen = sizeof(addr);
int one = 1;
sock = accept(listenSock, (struct sockaddr *) &addr, &addrlen);
@@ -537,7 +538,7 @@ rfbBool
SameMachine(int sock)
{
struct sockaddr_in peeraddr, myaddr;
- int addrlen = sizeof(struct sockaddr_in);
+ socklen_t addrlen = sizeof(struct sockaddr_in);
getpeername(sock, (struct sockaddr *)&peeraddr, &addrlen);
getsockname(sock, (struct sockaddr *)&myaddr, &addrlen);