From 350a54fbb34e877f919f62396305ea340305c944 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Mon, 14 Oct 2024 21:01:07 +0200 Subject: [PATCH] [code-quality] udp component --- esphome/components/udp/udp_component.cpp | 2 ++ esphome/components/udp/udp_component.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/esphome/components/udp/udp_component.cpp b/esphome/components/udp/udp_component.cpp index 799ed813d3..3fcef9e4f9 100644 --- a/esphome/components/udp/udp_component.cpp +++ b/esphome/components/udp/udp_component.cpp @@ -3,6 +3,7 @@ #include "esphome/components/network/util.h" #include "udp_component.h" +#ifdef USE_NETWORK namespace esphome { namespace udp { @@ -614,3 +615,4 @@ void UDPComponent::send_ping_pong_request_() { } } // namespace udp } // namespace esphome +#endif diff --git a/esphome/components/udp/udp_component.h b/esphome/components/udp/udp_component.h index 69bf335a90..bbe46a562f 100644 --- a/esphome/components/udp/udp_component.h +++ b/esphome/components/udp/udp_component.h @@ -1,6 +1,7 @@ #pragma once #include "esphome/core/component.h" +#ifdef USE_NETWORK #ifdef USE_SENSOR #include "esphome/components/sensor/sensor.h" #endif @@ -156,3 +157,4 @@ class UDPComponent : public PollingComponent { } // namespace udp } // namespace esphome +#endif