From 0a5f3d38ec4169d1c005d5c4ecf13ec56ae29eac Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Fri, 15 Dec 2023 17:32:44 -0500 Subject: [PATCH] Remove dead !HAVE_LWIP_UDP_BIND_NETIF configuration (#31045) * Remove dead !HAVE_LWIP_UDP_BIND_NETIF configuration This define came in with the initial import, but we never provided any way to turn it off. Remove that case as dead code. * Remove LWIP_NO_STDINT_H on Android Android doesn't use lwIP, and the NDK has stdint.h, so this seems pretty strange. Remove it. --- src/inet/UDPEndPointImplLwIP.cpp | 8 -------- src/lwip/BUILD.gn | 7 ++----- src/platform/mt793x/lwip/BUILD.gn | 12 ------------ 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/inet/UDPEndPointImplLwIP.cpp b/src/inet/UDPEndPointImplLwIP.cpp index 5078d750a05059..7627ff667db57d 100755 --- a/src/inet/UDPEndPointImplLwIP.cpp +++ b/src/inet/UDPEndPointImplLwIP.cpp @@ -23,10 +23,6 @@ #include -#if CHIP_HAVE_CONFIG_H -#include // nogncheck -#endif // CHIP_HAVE_CONFIG_H - #if INET_CONFIG_ENABLE_IPV4 #include #endif // INET_CONFIG_ENABLE_IPV4 @@ -121,13 +117,9 @@ CHIP_ERROR UDPEndPointImplLwIP::LwIPBindInterface(struct udp_pcb * aUDP, Interfa InterfaceId UDPEndPointImplLwIP::GetBoundInterface() const { -#if HAVE_LWIP_UDP_BIND_NETIF struct netif * netif; RunOnTCPIP([this, &netif]() { netif = netif_get_by_index(mUDP->netif_idx); }); return InterfaceId(netif); -#else - return InterfaceId(mUDP->intf_filter); -#endif } uint16_t UDPEndPointImplLwIP::GetBoundPort() const diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index d6248cbfba01a3..9f210f9760f71a 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -84,16 +84,13 @@ buildconfig_header("lwip_buildconfig") { header = "lwip_buildconfig.h" header_dir = "lwip" - defines = [ "HAVE_LWIP_UDP_BIND_NETIF=1" ] + defines = [] + if (lwip_platform != "external") { if (lwip_debug) { # Automatically enable LWIP_DEBUG for internal is_debug builds. defines += [ "LWIP_DEBUG=1" ] } - - if (current_os == "android") { - defines += [ "LWIP_NO_STDINT_H=1" ] - } } } diff --git a/src/platform/mt793x/lwip/BUILD.gn b/src/platform/mt793x/lwip/BUILD.gn index 55c170c2f9efaa..e6115b33340cde 100644 --- a/src/platform/mt793x/lwip/BUILD.gn +++ b/src/platform/mt793x/lwip/BUILD.gn @@ -33,18 +33,6 @@ declare_args() { import("//build_overrides/mt793x_sdk.gni") import("${mt793x_sdk_build_root}/mt793x_sdk.gni") -#buildconfig_header("lwip_buildconfig") { -# header = "lwip_buildconfig.h" -# header_dir = "lwip" -# -# defines = [ "HAVE_LWIP_UDP_BIND_NETIF=1" ] -# if (lwip_platform != "external") { -# if (current_os == "android") { -# defines += [ "LWIP_NO_STDINT_H=1" ] -# } -# } -#} - config("lwip_config") { include_dirs = [ "${mt793x_sdk_root}/project/mt7933_hdk/apps/${mt793x_project_name}/inc",