summaryrefslogtreecommitdiffstats
path: root/libvncclient
diff options
context:
space:
mode:
authorRex Dieter <rdieter@math.unl.edu>2016-02-18 08:29:07 -0600
committerRex Dieter <rdieter@math.unl.edu>2016-04-18 15:17:22 -0500
commit53cc1fa18a3b96d2c31a145d971017564fca39bb (patch)
tree573b0f5e508e117e26715fec156f4b8fb5c44638 /libvncclient
parent5b322f523faa437d8e7d03736bdb1714e8f84ce5 (diff)
downloadlibtdevnc-53cc1fa18a3b96d2c31a145d971017564fca39bb.tar.gz
libtdevnc-53cc1fa18a3b96d2c31a145d971017564fca39bb.zip
use namespaced rfbMax macro (issue #102)
Not using generic 'max', avoids conflicts with stl_algobase.h
Diffstat (limited to 'libvncclient')
-rw-r--r--libvncclient/listen.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libvncclient/listen.c b/libvncclient/listen.c
index 739cd9f..e989d6a 100644
--- a/libvncclient/listen.c
+++ b/libvncclient/listen.c
@@ -30,9 +30,6 @@
#ifdef WIN32
#define close closesocket
#include <winsock2.h>
-#ifdef _MINGW32
-#undef max
-#endif // #ifdef _MINGW32
#else // #ifdef WIN32
#include <sys/wait.h>
#include <sys/utsname.h>
@@ -99,7 +96,7 @@ listenForIncomingConnections(rfbClient* client)
if(listen6Socket >= 0)
FD_SET(listen6Socket, &fds);
- r = select(max(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL);
+ r = select(rfbMax(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL);
if (r > 0) {
if (FD_ISSET(listenSocket, &fds))
@@ -195,9 +192,9 @@ listenForIncomingConnectionsNoFork(rfbClient* client, int timeout)
FD_SET(client->listen6Sock, &fds);
if (timeout < 0)
- r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL);
+ r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL);
else
- r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to);
+ r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to);
if (r > 0)
{