Skip to content

Commit 83b290c

Browse files
author
liuxinaliang
committed
[net][lwip] fix lwIP 2.1.0 personalized sign bug
1 parent a0e62f6 commit 83b290c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/net/lwip-2.1.0/src/netif/ethernetif.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,13 @@ static err_t eth_netif_device_init(struct netif *netif)
487487
rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_uint16_t flags)
488488
{
489489
struct netif* netif;
490-
490+
#if LWIP_NETIF_HOSTNAME
491+
#define LWIP_HOSTNAME_LEN 16
492+
char *hostname = RT_NULL;
493+
netif = (struct netif*) rt_malloc (sizeof(struct netif) + LWIP_HOSTNAME_LEN);
494+
#else
491495
netif = (struct netif*) rt_malloc (sizeof(struct netif));
496+
#endif
492497
if (netif == RT_NULL)
493498
{
494499
rt_kprintf("malloc netif failed\n");

0 commit comments

Comments
 (0)