diff options
author | Christian Beier <dontmind@freeshell.org> | 2016-04-24 17:02:15 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2016-04-24 17:02:15 +0200 |
commit | 785f0fa2d1fe18f08bf521ed4a0d34a5d0c87782 (patch) | |
tree | 26aa53ef4fe4eb10fbe75a6f8a465d37331aa9a8 /libvncclient | |
parent | fc3dfdd9c59a6a36f7add3255aaad50d56228c59 (diff) | |
parent | 53cc1fa18a3b96d2c31a145d971017564fca39bb (diff) | |
download | libtdevnc-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.c | 9 |
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) { |