diff --git a/lib/socket.c b/lib/socket.c index b14231e..699ed8a 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -401,8 +401,12 @@ static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_s static int portOfs = 0; const int firstPort = 512; /* >= 512 according to Sun docs */ const int portCount = IPPORT_RESERVED - firstPort; - int startOfs = portOfs, port, rc; + int startOfs, port, rc; + if (portOfs == 0) { + portOfs = time(NULL) % 400; + } + startOfs = portOfs; do { rc = -1; port = htons(firstPort + portOfs); diff --git a/win32build.bat b/win32build.bat index 35a3c30..388f3d3 100755 --- a/win32build.bat +++ b/win32build.bat @@ -65,26 +65,3 @@ cl /I. /Iwin32 /Iinclude/nfsc /Iinclude /Imount /Infs -Zi -Od -DWIN32 -D_WIN32_W - - - - - -.lib mswsock.lib advapi32.lib wsock32.lib advapi32.lib - - - - - - - - - - - - - - - - -