A few mac fixes
This commit is contained in:
@@ -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
|
DWORD timeout = 1; // Minimum socket timeout in Windows is 1ms
|
||||||
#else
|
#else
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
tv.tv_sec = 0;
|
timeout.tv_sec = 0;
|
||||||
tv.tv_usec = 500;
|
timeout.tv_usec = 500;
|
||||||
#endif
|
#endif
|
||||||
if (setsockopt(sock.sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(timeout)) < 0)
|
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);
|
status = recv(sock.sock, buffer, len, 0);
|
||||||
#else
|
#else
|
||||||
// For apple or linux-just read - will timeout in 0.5 ms
|
// 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
|
#endif
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,11 @@
|
|||||||
#if IBM
|
#if IBM
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <GL/gl.h>
|
#ifdef __APPLE__
|
||||||
|
# include <OpenGL/gl.h>
|
||||||
|
#else
|
||||||
|
# include <GL/gl.h>
|
||||||
|
#endif/*__APPLE__*/
|
||||||
|
|
||||||
namespace XPC
|
namespace XPC
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user