mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +00:00
raw: Fix build error
IP6_HLEN is only defined when LWIP_IPV6, IP_HLEN is only defined when LWIP_IPV4.
This fixes build error in !LWIP_IPV4 || !LWIP_IPV6 cases.
Fixes: f2c7e9c939
("raw: Remove unnecessary #if guard around PCB_ISIPV6() calls")
Reported-by: Erik Ekman
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
1ee574944c
commit
fe2cfe2dba
@ -246,7 +246,14 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr)
|
|||||||
|
|
||||||
LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n"));
|
LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n"));
|
||||||
|
|
||||||
header_size = PCB_ISIPV6(pcb) ? IP6_HLEN : IP_HLEN;
|
header_size = (
|
||||||
|
#if LWIP_IPV4 && LWIP_IPV6
|
||||||
|
PCB_ISIPV6(pcb) ? IP6_HLEN : IP_HLEN);
|
||||||
|
#elif LWIP_IPV4
|
||||||
|
IP_HLEN);
|
||||||
|
#else
|
||||||
|
IP6_HLEN);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* not enough space to add an IP header to first pbuf in given p chain? */
|
/* not enough space to add an IP header to first pbuf in given p chain? */
|
||||||
if (pbuf_header(p, header_size)) {
|
if (pbuf_header(p, header_size)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user