We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e62f6 commit 83b290cCopy full SHA for 83b290c
components/net/lwip-2.1.0/src/netif/ethernetif.c
@@ -487,8 +487,13 @@ static err_t eth_netif_device_init(struct netif *netif)
487
rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_uint16_t flags)
488
{
489
struct netif* netif;
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
495
netif = (struct netif*) rt_malloc (sizeof(struct netif));
496
+#endif
497
if (netif == RT_NULL)
498
499
rt_kprintf("malloc netif failed\n");
0 commit comments