Skip to content

Commit

Permalink
Remove lwIP from src/inet deps in socket builds
Browse files Browse the repository at this point in the history
We're getting a bunch of lwIP #defines in Linux builds, even though
these builds don't use lwIP. Fix the src/inet dependency to check
chip_system_config_use_lwip, which controls whether CHIP uses lwIP in
its networking abstractions.

This requires annotating some conditional #includes with // nogncheck
because the checker doesn't preprocess the file.
  • Loading branch information
mspang committed Jun 21, 2021
1 parent 6e64fbf commit f685144
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/inet/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static_library("inet") {
"${nlio_root}:nlio",
]

if (chip_with_lwip) {
if (chip_system_config_use_lwip) {
public_deps += [ "${chip_root}/src/lwip" ]
}

Expand Down
2 changes: 1 addition & 1 deletion src/inet/RawEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <lwip/raw.h>
#include <lwip/tcpip.h>
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#include <lwip/lwip_buildconfig.h> // nogncheck
#endif // CHIP_HAVE_CONFIG_H
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP

Expand Down
2 changes: 1 addition & 1 deletion src/inet/UDPEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <lwip/tcpip.h>
#include <lwip/udp.h>
#if CHIP_HAVE_CONFIG_H
#include <lwip/lwip_buildconfig.h>
#include <lwip/lwip_buildconfig.h> // nogncheck
#endif // CHIP_HAVE_CONFIG_H
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP

Expand Down

0 comments on commit f685144

Please sign in to comment.