Skip to content

Commit

Permalink
Merge branch 'lwip/if_indextoname_compolation_fix_v5.3' into 'release…
Browse files Browse the repository at this point in the history
…/v5.3'

rfix(lwip): Fixed compilation error referencing undefined POSIX interface API (v5.3)

See merge request espressif/esp-idf!31405
  • Loading branch information
jack0c committed Aug 2, 2024
2 parents 611beb2 + ca967c9 commit b82594e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/lwip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions components/lwip/port/if_index.c
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit b82594e

Please sign in to comment.