fix(lwip): Fixed compilation error referencing undefined POSIX interface API

Closes https://github.com/espressif/esp-idf/issues/13577
pull/13854/head
Abhik Roy 2024-04-29 20:07:33 +10:00
rodzic d3abfa3d73
commit 67440fa4e9
2 zmienionych plików z 21 dodań i 0 usunięć

Wyświetl plik

@ -102,6 +102,10 @@ if(CONFIG_LWIP_ENABLE)
"port/sockets_ext.c"
"port/freertos/sys_arch.c")
if(CONFIG_LWIP_NETIF_API)
list(APPEND srcs "port/if_index.c")
endif()
if(CONFIG_LWIP_PPP_SUPPORT)
list(APPEND srcs
"lwip/src/netif/ppp/auth.c"

Wyświetl plik

@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "lwip/if_api.h"
unsigned int if_nametoindex(const char *ifname)
{
return lwip_if_nametoindex(ifname);
}
char *if_indextoname(unsigned int ifindex, char *ifname)
{
return lwip_if_indextoname(ifindex, ifname);
}