LWIP_CSRCS += def.c dhcp.c init.c mem.c memp.c netif.c
-LWIP_CSRCS += pbuf.c raw.c stats.c sys.c tcp.c tcp_in.c tcp_out.c timers.c udp.c
+LWIP_CSRCS += pbuf.c raw.c sys.c tcp.c tcp_in.c tcp_out.c timers.c udp.c
LWIP_CSRCS += dhcps.c
+ifeq ($(CONFIG_NET_STATS),y)
+LWIP_CSRCS += stats.c
+endif
# Include core build support
#define SYS_THREAD_MAX 6
static u16_t s_nextthread = 0;
-
+static u32_t g_mbox_id = 0;
/*---------------------------------------------------------------------------*
* Routine: sys_mbox_new
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
err_t sys_mbox_new(sys_mbox_t *mbox, int queue_sz)
{
-
err_t err = ERR_OK;
mbox->is_valid = 1;
- mbox->id = lwip_stats.sys.mbox.used + 1;
+ mbox->id = g_mbox_id++;
mbox->queue_size = queue_sz;
mbox->wait_send = 0;
mbox->wait_fetch = 0;