Workaround for compile error on TCP_REG. This workaround is disabled by default.

This commit is contained in:
likewise 2002-11-11 14:47:26 +00:00
parent 9b76f5bf53
commit bca526b634

View File

@ -48,6 +48,8 @@
#include "lwip/tcp.h"
#include "lwipopts.h"
/* Incremented every coarse grained timer shot
(typically every 500 ms, determined by TCP_COARSE_TIMEOUT). */
u32_t tcp_ticks;
@ -310,7 +312,14 @@ tcp_listen(struct tcp_pcb *pcb)
#if LWIP_CALLBACK_API
lpcb->accept = tcp_accept_null;
#endif /* LWIP_CALLBACK_API */
/* workaround for compile error: assignment requires modifiable lvalue in TCP_REG */
#if LWIP_TCP_REG_COMPILE_ERROR
// place this pcb at the start the "listening pcbs" list
lpcb->next = tcp_listen_pcbs;
tcp_listen_pcbs = lpcb;
#else
TCP_REG((struct tcp_pcb **)&tcp_listen_pcbs, (struct tcp_pcb *)lpcb);
#endif
return (struct tcp_pcb *)lpcb;
}
/*-----------------------------------------------------------------------------------*/