miniupnpd/portinuse.c: add #ifdef __linux__

TODO : BSD Code
This commit is contained in:
Thomas Bernard 2014-03-13 14:58:36 +01:00
parent 15a2320c86
commit 09bbaac63a
1 changed files with 5 additions and 2 deletions

View File

@ -37,11 +37,13 @@ port_in_use(const char *if_name,
unsigned eport, int proto,
const char *iaddr, unsigned iport)
{
char line[256];
FILE *f;
int found = 0;
char ip_addr_str[INET_ADDRSTRLEN];
struct in_addr ip_addr;
#ifdef __linux__
/* linux code */
char line[256];
FILE *f;
const char * tcpfile = "/proc/net/tcp";
const char * udpfile = "/proc/net/udp";
@ -80,6 +82,7 @@ port_in_use(const char *if_name,
}
}
fclose(f);
#endif /* __linux__ */
#if defined(USE_NETFILTER)
if (!found) {