[code-quality] fix clang-tidy socket (#7285)

This commit is contained in:
tomaszduda23 2024-08-20 00:53:15 +02:00 committed by GitHub
parent 30414667d0
commit 3cbdf63f56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#include "socket.h"
#if defined(USE_SOCKET_IMPL_LWIP_TCP) || defined(USE_SOCKET_IMPL_LWIP_SOCKETS) || defined(USE_SOCKET_IMPL_BSD_SOCKETS)
#include <cerrno>
#include <cstring>
#include <string>
@ -74,3 +75,4 @@ socklen_t set_sockaddr_any(struct sockaddr *addr, socklen_t addrlen, uint16_t po
}
} // namespace socket
} // namespace esphome
#endif

View File

@ -5,6 +5,7 @@
#include "esphome/core/optional.h"
#include "headers.h"
#if defined(USE_SOCKET_IMPL_LWIP_TCP) || defined(USE_SOCKET_IMPL_LWIP_SOCKETS) || defined(USE_SOCKET_IMPL_BSD_SOCKETS)
namespace esphome {
namespace socket {
@ -57,3 +58,4 @@ socklen_t set_sockaddr_any(struct sockaddr *addr, socklen_t addrlen, uint16_t po
} // namespace socket
} // namespace esphome
#endif