miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

20140401 getgateway.c bug

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Bugs
View previous topic :: View next topic  
Author Message
rb07



Joined: 31 May 2009
Posts: 8

PostPosted: Thu Jul 03, 2014 6:22 am    Post subject: 20140401 getgateway.c bug Reply with quote

In line 70 there is:

Code:
#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE)
int getdefaultgateway(in_addr_t * addr)
{
   return -1;
}
#endif


This breaks compilation on anything but Linux, BSD/FreeBSD, Mac OSX, Sun, SysV R4. I deleted it to build for Windows.

Did you mean to put this below all other OS definitions, and using a condition that excludes every OS that has its own definition and implementation?

i.e.

Code:
...
#include "getgateway.h"

#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE) \
&& !defined(WIN32) && !defined(__CYGWIN__) && !defined(__HAIKU__)
int getdefaultgateway(in_addr_t * addr)
{
   return -1;
}
#endif

_________________
R.B.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.