diff options
| author | liuxinaliang <[email protected]> | 2019-12-29 15:35:22 +0800 |
|---|---|---|
| committer | liuxinaliang <[email protected]> | 2019-12-29 15:35:22 +0800 |
| commit | 83b290c2897e0e8c319e2f0ab0b52d3276bfe0c5 (patch) | |
| tree | c0e4387f74b89020cfe427eb1a0e6368e2a78555 | |
| parent | a0e62f665f5063991b43bebda51057a2286e07ad (diff) | |
[net][lwip] fix lwIP 2.1.0 personalized sign bug
| -rwxr-xr-x | components/net/lwip-2.1.0/src/netif/ethernetif.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/net/lwip-2.1.0/src/netif/ethernetif.c b/components/net/lwip-2.1.0/src/netif/ethernetif.c index f73ed635a1..55ffaa89df 100755 --- a/components/net/lwip-2.1.0/src/netif/ethernetif.c +++ b/components/net/lwip-2.1.0/src/netif/ethernetif.c @@ -487,8 +487,13 @@ static err_t eth_netif_device_init(struct netif *netif) rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_uint16_t flags) { struct netif* netif; - +#if LWIP_NETIF_HOSTNAME +#define LWIP_HOSTNAME_LEN 16 + char *hostname = RT_NULL; + netif = (struct netif*) rt_malloc (sizeof(struct netif) + LWIP_HOSTNAME_LEN); +#else netif = (struct netif*) rt_malloc (sizeof(struct netif)); +#endif if (netif == RT_NULL) { rt_kprintf("malloc netif failed\n"); |
