native/net/tapdev: Fix for new UIP_CONF_IPV6 handling.

This commit is contained in:
Robert Quattlebaum 2013-05-19 17:27:30 -07:00
parent 382308e6bf
commit 9c70e0e5cc
4 changed files with 16 additions and 7 deletions

View file

@ -31,6 +31,8 @@
*/ */
#include "contiki-net.h" #include "contiki-net.h"
#include "net/uip.h"
#include "net/uipopt.h"
#if UIP_CONF_IPV6 #if UIP_CONF_IPV6
#include "tapdev6.h" #include "tapdev6.h"

View file

@ -33,6 +33,11 @@
* *
*/ */
#include "net/uip.h"
#include "net/uipopt.h"
#if !UIP_CONF_IPV6
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -198,3 +203,5 @@ tapdev_exit(void)
{ {
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#endif /* !UIP_CONF_IPV6 */

View file

@ -33,6 +33,10 @@
* *
*/ */
#include "net/uip.h"
#include "net/uipopt.h"
#if UIP_CONF_IPV6
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
@ -413,3 +417,5 @@ tapdev_exit(void)
close(fd); close(fd);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#endif /* UIP_CONF_IPV6 */

View file

@ -14,13 +14,7 @@ CONTIKI_TARGET_SOURCEFILES = contiki-main.c clock.c leds.c leds-arch.c cfs-posix
ifeq ($(HOST_OS),Windows) ifeq ($(HOST_OS),Windows)
CONTIKI_TARGET_SOURCEFILES += wpcap-drv.c wpcap.c CONTIKI_TARGET_SOURCEFILES += wpcap-drv.c wpcap.c
else else
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c tapdev.c tapdev6.c
#math
ifneq ($(UIP_CONF_IPV6),1)
CONTIKI_TARGET_SOURCEFILES += tapdev.c
else
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
endif
endif endif
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)