Fixed redefinition warnings for EAFNOSUPPORT and EADDRINUSE, Google turned up that they are newly defined in VS2010
unixutil.h, line 41
upnputil.h, line 125
Had a look here; http://bugs.ruby-lang.org/issues/3092 and added the mentioned fixes as found here; http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27222&r2=27236&pathrev=27258&diff_format=h and here http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27236&r2=27258&pathrev=27258&diff_format=h
(cherry picked from commit 89fe655aee
)
This commit is contained in:
parent
4e25119237
commit
615f5d18ac
@ -35,10 +35,13 @@
|
|||||||
/* Unix-specific network utilities */
|
/* Unix-specific network utilities */
|
||||||
|
|
||||||
#include "UpnpInet.h"
|
#include "UpnpInet.h"
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#define EAFNOSUPPORT 97
|
#ifndef EAFNOSUPPORT /* VS2010 has this defined */
|
||||||
|
#define EAFNOSUPPORT 97
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "upnp.h"
|
#include "upnp.h"
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
/* usually used to specify direction of parameters in functions */
|
/* usually used to specify direction of parameters in functions */
|
||||||
#ifndef IN
|
#ifndef IN
|
||||||
@ -122,7 +123,9 @@ void linecopylen(
|
|||||||
#ifndef S_ISDIR
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
#define EADDRINUSE WSAEADDRINUSE
|
#ifndef EADDRINUSE /* VS2010 has this defined */
|
||||||
|
#define EADDRINUSE WSAEADDRINUSE
|
||||||
|
#endif
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
#define strncasecmp strnicmp
|
#define strncasecmp strnicmp
|
||||||
#define sleep(a) Sleep((a)*1000)
|
#define sleep(a) Sleep((a)*1000)
|
||||||
|
Loading…
Reference in New Issue
Block a user