A few mac fixes

This commit is contained in:
Chris Teubert
2015-04-23 10:07:47 -07:00
parent 83a010faa4
commit 795e284ab2
2 changed files with 8 additions and 4 deletions

View File

@@ -113,8 +113,8 @@ XPCSocket openUDP(const char *xpIP, unsigned short xpPort, unsigned short port)
DWORD timeout = 1; // Minimum socket timeout in Windows is 1ms
#else
struct timeval timeout;
tv.tv_sec = 0;
tv.tv_usec = 500;
timeout.tv_sec = 0;
timeout.tv_usec = 500;
#endif
if (setsockopt(sock.sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout)) < 0)
{
@@ -200,7 +200,7 @@ int readUDP(XPCSocket sock, char buffer[], int len)
status = recv(sock.sock, buffer, len, 0);
#else
// For apple or linux-just read - will timeout in 0.5 ms
status = (int)recv(sock.sock, dataRef, len, 0);
int status = (int)recv(sock.sock, buffer, len, 0);
#endif
if (status < 0)
{

View File

@@ -27,7 +27,11 @@
#if IBM
#include <windows.h>
#endif
#include <GL/gl.h>
#ifdef __APPLE__
# include <OpenGL/gl.h>
#else
# include <GL/gl.h>
#endif/*__APPLE__*/
namespace XPC
{