Browse Source

unix port: fix compiling tapif for NO_SYS

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
master
Simon Goldschmidt 8 years ago
parent
commit
5c8e1dffc8
  1. 7
      ports/unix/example_app/default_netif.c
  2. 1
      ports/unix/port/include/netif/tapif.h
  3. 6
      ports/unix/port/netif/tapif.c

7
ports/unix/example_app/default_netif.c

@ -49,16 +49,17 @@ void init_default_netif(void)
#endif
{
#if NO_SYS
#error tapif not implemented for NO_SYS mode
#else /* NO_SYS */
netif_add(&netif, NETIF_ADDRS NULL, tapif_init, netif_input);
#else
netif_add(&netif, NETIF_ADDRS NULL, tapif_init, tcpip_input);
#endif /* NO_SYS */
#endif
netif_set_default(&netif);
}
void
default_netif_poll(void)
{
tapif_poll(&netif);
}
void

1
ports/unix/port/include/netif/tapif.h

@ -35,6 +35,7 @@
#include "lwip/netif.h"
err_t tapif_init(struct netif *netif);
void tapif_poll(struct netif *netif);
#if NO_SYS
int tapif_select(struct netif *netif);
#endif /* NO_SYS */

6
ports/unix/port/netif/tapif.c

@ -368,6 +368,12 @@ tapif_init(struct netif *netif)
/*-----------------------------------------------------------------------------------*/
void
tapif_poll(struct netif *netif)
{
tapif_input(netif);
}
#if NO_SYS
int

Loading…
Cancel
Save