rb07
Joined: 31 May 2009 Posts: 8
|
Posted: Thu Jul 03, 2014 6:22 am Post subject: 20140401 getgateway.c bug |
|
|
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. |
|