diff --git a/components/sock_utils/include/netdb_macros.h b/components/sock_utils/include/netdb_macros.h index 6c518c9bbe..91987dc91f 100644 --- a/components/sock_utils/include/netdb_macros.h +++ b/components/sock_utils/include/netdb_macros.h @@ -5,6 +5,17 @@ */ #pragma once +#include "sdkconfig.h" +#ifndef CONFIG_IDF_TARGET_LINUX +#include // For network-related definitions +#include // For socket-related definitions +#include // For interface flags (e.g., IFF_UP) +#include // For NI_NUMERICHOST, NI_NUMERICSERV, etc. +#include // For EAI_BADFLAGS +#include // For AF_UNIX +#include // For PF_LOCAL +#endif + #ifndef NI_NUMERICHOST #define NI_NUMERICHOST 0x1 #endif