# HG changeset patch # User asl # Date 1147192064 0 # Node ID 5de1c0ccd020734518bae6be46d3e0f59a004665 # Parent 9619b62d5be9adb2d16ed0f6f5e53beb1b7a71d2 * src/ecos/init.c (arp_timer): Only compile this function when Ethernet is supported. * include/lwipopts.h: PAP_SUPPORT & CHAP_SUPPORT must be either 0 or 1 otherwise we get compiler errors. diff --git a/packages/net/lwip_tcpip/current/ChangeLog b/packages/net/lwip_tcpip/current/ChangeLog --- a/packages/net/lwip_tcpip/current/ChangeLog +++ b/packages/net/lwip_tcpip/current/ChangeLog @@ -1,3 +1,10 @@ +2006-05-09 Andrew Lunn + + * src/ecos/init.c (arp_timer): Only compile this function when + Ethernet is supported. + * include/lwipopts.h: PAP_SUPPORT & CHAP_SUPPORT must be either 0 + or 1 otherwise we get compiler errors. + 2006-03-26 Uwe Kindler * Updated the complete lwIP source to the latest lwIP diff --git a/packages/net/lwip_tcpip/current/include/lwipopts.h b/packages/net/lwip_tcpip/current/include/lwipopts.h --- a/packages/net/lwip_tcpip/current/include/lwipopts.h +++ b/packages/net/lwip_tcpip/current/include/lwipopts.h @@ -164,8 +164,16 @@ a lot of data that needs to be copied, t #define PPP_SUPPORT defined(CYGPKG_LWIP_PPP) #define PPP_DEV CYGDAT_LWIP_PPP_DEV #define MD5_SUPPORT 1 -#define PAP_SUPPORT defined(CYGIMP_LWIP_PPP_PAP_AUTH) -#define CHAP_SUPPORT defined(CYGIMP_LWIP_PPP_CHAP_AUTH) +#ifdef CYGIMP_LWIP_PPP_PAP_AUTH +#define PAP_SUPPORT 1 +#else +#define PAP_SUPPORT 0 +#endif +#ifdef CYGIMP_LWIP_PPP_CHAP_AUTH +#define CHAP_SUPPORT 1 +#else +#define CHAP_SUPPORT 0 +#endif /* ------- Thread priorities ---------------*/ diff --git a/packages/net/lwip_tcpip/current/src/ecos/init.c b/packages/net/lwip_tcpip/current/src/ecos/init.c --- a/packages/net/lwip_tcpip/current/src/ecos/init.c +++ b/packages/net/lwip_tcpip/current/src/ecos/init.c @@ -111,13 +111,14 @@ ppp_trace(int level, const char *format, struct netif ecos_loopif; #endif - +#ifdef CYGPKG_LWIP_ETH static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler) arp_timer, NULL); } +#endif #if LWIP_DHCP static void lwip_dhcp_fine_tmr(void *arg) @@ -143,7 +144,9 @@ static void lwip_dhcp_coarse_tmr(void *a // void tcpip_init_done(void * arg) { +#ifdef CYGPKG_LWIP_ETH sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler) arp_timer, NULL); +#endif #ifdef CYGOPT_LWIP_DHCP_MANAGEMENT sys_timeout(500, (sys_timeout_handler) lwip_dhcp_fine_tmr, NULL); sys_timeout(60000, (sys_timeout_handler) lwip_dhcp_coarse_tmr, NULL);