Skip to content

Commit

Permalink
Fix CHIPConfig.h not including InetConfig.h. (#29223)
Browse files Browse the repository at this point in the history
* Fix CHIPConfig.h not including InetConfig.h.

We had various things that were testing config bits that InetConfig.h would pull
in that never actually included InetConfig.h, because CHIPConfig.h did not
include it.

* Stop including inet things from CHIPCore.h.
  • Loading branch information
bzbarsky-apple authored and hhxxff committed Nov 15, 2023
1 parent 3681196 commit 96fc453
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/lib/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ source_set("chip_config_header") {
public_deps = [
":chip_buildconfig",
"${chip_root}/src/ble:ble_config_header",
"${chip_root}/src/inet:inet_config_header",
"${chip_root}/src/system:system_config_header",
]

Expand Down
4 changes: 2 additions & 2 deletions src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#include <ble/BleConfig.h>
#include <system/SystemConfig.h>

/* COMING SOON: making the INET Layer optional entails making this inclusion optional. */
// #include "InetConfig.h"
#include <inet/InetConfig.h>

/*
#if INET_CONFIG_ENABLE_TCP_ENDPOINT && INET_TCP_IDLE_CHECK_INTERVAL <= 0
#error "chip SDK requires INET_TCP_IDLE_CHECK_INTERVAL > 0"
Expand Down
8 changes: 0 additions & 8 deletions src/lib/core/CHIPCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@

#include <ble/BleConfig.h>

#if INET_CONFIG_ENABLE_TCP_ENDPOINT
#include <inet/TCPEndPoint.h>
#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT

#if INET_CONFIG_ENABLE_UDP_ENDPOINT
#include <inet/UDPEndPoint.h>
#endif // INET_CONFIG_ENABLE_UDP_ENDPOINT

#if CONFIG_NETWORK_LAYER_BLE
#include <ble/BleLayer.h>
#endif // CONFIG_NETWORK_LAYER_BLE
Expand Down

0 comments on commit 96fc453

Please sign in to comment.