Merge branch 'lwip/if_indextoname_compolation_fix_v5.0' into 'release/v5.0'

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

See merge request espressif/esp-idf!31408
This commit is contained in:
Jiang Jiang Jian
2024-07-02 13:52:22 +08:00
2 changed files with 21 additions and 0 deletions

View File

@ -123,6 +123,10 @@ if(CONFIG_LWIP_PPP_SUPPORT)
"lwip/src/netif/ppp/polarssl/md4.c"
"lwip/src/netif/ppp/polarssl/md5.c"
"lwip/src/netif/ppp/polarssl/sha1.c")
if(CONFIG_LWIP_NETIF_API)
list(APPEND srcs "port/if_index.c")
endif()
endif()
if(CONFIG_VFS_SUPPORT_IO)

View File

@ -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);
}