Clean up a bunch of warnings when building with Xcode 6.1

This commit is contained in:
Cameron Gutman
2014-10-18 11:32:29 -04:00
parent 8a5643784e
commit 0758de960a
9 changed files with 25 additions and 17 deletions
+5 -1
View File
@@ -9,6 +9,8 @@
#define SetLastSocketError(x) WSASetLastError(x)
#define LastSocketError() WSAGetLastError()
typedef int SOCK_RET;
#else
#include <sys/types.h>
#include <sys/socket.h>
@@ -16,12 +18,14 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#define SOCKET int
#define LastSocketError() errno
#define SetLastSocketError(x) errno = x
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define closesocket(x) close(x)
typedef int SOCKET;
typedef ssize_t SOCK_RET;
#endif
SOCKET connectTcpSocket(IP_ADDRESS dstaddr, unsigned short port);