diff --git a/src/core/dhcp.c b/src/core/dhcp.c index ecfe283b..fe85a7e8 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -76,7 +76,6 @@ #include "lwip/ip_addr.h" #include "lwip/netif.h" #include "lwip/def.h" -#include "lwip/sys.h" #include "lwip/dhcp.h" #include "lwip/autoip.h" #include "lwip/dns.h" diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index fb0e8741..78093c16 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -46,7 +46,6 @@ #include "lwip/def.h" #include "lwip/mem.h" #include "lwip/memp.h" -#include "lwip/sys.h" #include "lwip/ip_addr.h" #include "lwip/netif.h" #include "lwip/inet_chksum.h" @@ -55,6 +54,9 @@ #include "lwip/ip6.h" #include "lwip/ip6_addr.h" #include "lwip/inet_chksum.h" +#if LWIP_TCP_TIMESTAMPS +#include "lwip/sys.h" +#endif #include @@ -813,7 +815,6 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) return ERR_OK; } - #if LWIP_TCP_TIMESTAMPS /* Build a timestamp option (12 bytes long) at the specified options pointer) diff --git a/src/core/timers.c b/src/core/timers.c index da6278f0..c804c3d1 100644 --- a/src/core/timers.c +++ b/src/core/timers.c @@ -59,6 +59,7 @@ #include "lwip/nd6.h" #include "lwip/ip6_frag.h" #include "lwip/mld6.h" +#include "lwip/sys.h" /** The one and only timeout list */ static struct sys_timeo *next_timeout; diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index b37d5cf4..ffa5f68e 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -36,7 +36,6 @@ #if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ -#include "lwip/sys.h" #include "lwip/mem.h" #include "lwip/pbuf.h" #include "lwip/ip.h" diff --git a/src/include/lwip/tcp_impl.h b/src/include/lwip/tcp_impl.h index f3ae40d2..14c92fbb 100644 --- a/src/include/lwip/tcp_impl.h +++ b/src/include/lwip/tcp_impl.h @@ -37,7 +37,6 @@ #if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ #include "lwip/tcp.h" -#include "lwip/sys.h" #include "lwip/mem.h" #include "lwip/pbuf.h" #include "lwip/ip.h" diff --git a/src/include/lwip/timers.h b/src/include/lwip/timers.h index fb92b4b4..04e78e0f 100644 --- a/src/include/lwip/timers.h +++ b/src/include/lwip/timers.h @@ -41,7 +41,9 @@ #if LWIP_TIMERS #include "lwip/err.h" +#if !NO_SYS #include "lwip/sys.h" +#endif #ifdef __cplusplus extern "C" { diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index c22731ec..46900bdb 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -50,7 +50,6 @@ #include "lwip/def.h" #include "lwip/mem.h" #include "lwip/pbuf.h" -#include "lwip/sys.h" #include "lwip/stats.h" #include "lwip/snmp.h" #include "lwip/ethip6.h" diff --git a/src/netif/slipif.c b/src/netif/slipif.c index c19333dd..c908a1e4 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -49,10 +49,12 @@ #include "lwip/def.h" #include "lwip/pbuf.h" -#include "lwip/sys.h" #include "lwip/stats.h" #include "lwip/snmp.h" #include "lwip/sio.h" +#if !NO_SYS +#include "lwip/sys.h" +#endif #define SLIP_BLOCK 1 #define SLIP_DONTBLOCK 0 @@ -335,9 +337,11 @@ slipif_init(struct netif *netif) */ NETIF_INIT_SNMP(netif, snmp_ifType_slip, 0); +#if !NO_SYS /* Create a thread to poll the serial line. */ sys_thread_new(SLIPIF_THREAD_NAME, slipif_loop_thread, netif, SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO); +#endif return ERR_OK; }