summaryrefslogtreecommitdiffstats
path: root/libvncclient
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2016-04-24 17:02:15 +0200
committerChristian Beier <dontmind@freeshell.org>2016-04-24 17:02:15 +0200
commit785f0fa2d1fe18f08bf521ed4a0d34a5d0c87782 (patch)
tree26aa53ef4fe4eb10fbe75a6f8a465d37331aa9a8 /libvncclient
parentfc3dfdd9c59a6a36f7add3255aaad50d56228c59 (diff)
parent53cc1fa18a3b96d2c31a145d971017564fca39bb (diff)
downloadlibtdevnc-785f0fa2d1fe18f08bf521ed4a0d34a5d0c87782.tar.gz
libtdevnc-785f0fa2d1fe18f08bf521ed4a0d34a5d0c87782.zip
Merge pull request #103 from rdieter/master
use namespaced vnc_max macro (issue #102)
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)
{