mirror of
https://github.com/ntop/n2n.git
synced 2026-10-19 16:16:12 +00:00
Address more windows compile warnings
This commit is contained in:
@@ -50,8 +50,10 @@
|
||||
|
||||
// REVISIT: may become obsolete
|
||||
#ifdef WIN32
|
||||
#ifndef STDIN_FILENO
|
||||
#define STDIN_FILENO _fileno(stdin)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct n2n_portfwd_conf {
|
||||
@@ -197,6 +199,11 @@ int _kbhit () {
|
||||
|
||||
return FD_ISSET(STDIN_FILENO, &fds);
|
||||
}
|
||||
#else
|
||||
// A dummy definition to avoid compile errors on windows
|
||||
int _kbhit () {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+7
-1
@@ -75,8 +75,10 @@
|
||||
|
||||
// REVISIT: may become obsolete
|
||||
#ifdef WIN32
|
||||
#ifndef STDIN_FILENO
|
||||
#define STDIN_FILENO _fileno(stdin)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct n2n_route {
|
||||
@@ -496,7 +498,6 @@ void handle_route (n2n_route_t* in_route, int verb) {
|
||||
|
||||
#elif defined(WIN32)
|
||||
// REVISIT: use 'CreateIpForwardEntry()' and 'DeleteIpForwardEntry()' [iphlpapi.h]
|
||||
struct in_addr net_addr, gateway;
|
||||
char c_net_addr[32];
|
||||
char c_gateway[32];
|
||||
char c_interface[32];
|
||||
@@ -657,6 +658,11 @@ int _kbhit () {
|
||||
|
||||
return FD_ISSET(STDIN_FILENO, &fds);
|
||||
}
|
||||
#else
|
||||
// A dummy definition to avoid compile errors on windows
|
||||
int _kbhit () {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user