From 74d2b0049b56bd3d41adf6014e72c2744381d742 Mon Sep 17 00:00:00 2001 From: Oxy Date: Mon, 21 Aug 2006 05:03:28 +0000 Subject: [PATCH] Windows-specific code for error threating added git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@84 119443c7-1b9e-41f8-b6fc-b9c35fce742c --- upnp/src/genlib/miniserver/miniserver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upnp/src/genlib/miniserver/miniserver.c b/upnp/src/genlib/miniserver/miniserver.c index b6368da..2ddc385 100644 --- a/upnp/src/genlib/miniserver/miniserver.c +++ b/upnp/src/genlib/miniserver/miniserver.c @@ -651,6 +651,11 @@ get_miniserver_sockets( MiniServerSockArray * out, sizeof( struct sockaddr_in ) ); if( sockError == UPNP_SOCKETERROR ) { +#ifdef WIN32 + errCode = WSAGetLastError(); +#else + errCode = errno; +#endif if( errno == EADDRINUSE ) errCode = 1; } else