Permalink
Browse files

add in scary ifdef for win32 socket init, i think

  • Loading branch information...
1 parent bee1ead commit e492348b3c79abb38948368fac45ea0b0da3f298 @RJ committed Jul 9, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/portfwd.cpp
View
@@ -18,6 +18,15 @@ Portfwd::~Portfwd()
bool
Portfwd::init(unsigned int timeout)
{
+#ifdef WIN32
+ WSADATA wsaData;
+ int nResult = WSAStartup(MAKEWORD(2,2), &wsaData);
+ if(nResult != NO_ERROR)
+ {
+ fprintf(stderr, "WSAStartup() failed.\n");
+ return -1;
+ }
+#endif
struct UPNPDev * devlist;
struct UPNPDev * dev;
char * descXML;

0 comments on commit e492348

Please sign in to comment.