diff --git a/src/core/net/tcp6.hpp b/src/core/net/tcp6.hpp index 10c597823..510ed85bb 100644 --- a/src/core/net/tcp6.hpp +++ b/src/core/net/tcp6.hpp @@ -36,6 +36,8 @@ #include "openthread-core-config.h" +#if OPENTHREAD_CONFIG_TCP_ENABLE + #include #include "common/as_core_type.hpp" @@ -592,4 +594,6 @@ DefineCoreType(otTcpListener, Ip6::Tcp::Listener); } // namespace ot +#endif // OPENTHREAD_CONFIG_TCP_ENABLE + #endif // OT_CORE_NET_TCP6_HPP_ diff --git a/src/core/net/tcp6_ext.hpp b/src/core/net/tcp6_ext.hpp index ffa187201..e9f7ab18d 100644 --- a/src/core/net/tcp6_ext.hpp +++ b/src/core/net/tcp6_ext.hpp @@ -36,6 +36,8 @@ #include "openthread-core-config.h" +#if OPENTHREAD_CONFIG_TCP_ENABLE + #include #include "net/tcp6.hpp" @@ -130,4 +132,6 @@ DefineCoreType(otTcpCircularSendBuffer, Ip6::TcpCircularSendBuffer); } // namespace ot +#endif // OPENTHREAD_CONFIG_TCP_ENABLE + #endif // OT_CORE_NET_TCP6_EXT_HPP_ diff --git a/tests/toranj/openthread-core-toranj-config.h b/tests/toranj/openthread-core-toranj-config.h index 9356dc126..67fd1774f 100644 --- a/tests/toranj/openthread-core-toranj-config.h +++ b/tests/toranj/openthread-core-toranj-config.h @@ -141,6 +141,8 @@ #define OPENTHREAD_CONFIG_IP6_SLAAC_DEPRECATION_INTERVAL 30 +#define OPENTHREAD_CONFIG_TCP_ENABLE 0 + #define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1 #define OPENTHREAD_CONFIG_MAC_FILTER_SIZE 80