Skip to content

Commit ade9448

Browse files
committed
fix(sockutls): Fix potential macro colission including standard headers
1 parent 4745fc8 commit ade9448

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/sock_utils/include/netdb_macros.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
*/
66
#pragma once
77

8+
#include "sdkconfig.h"
9+
#ifndef CONFIG_IDF_TARGET_LINUX
10+
#include <netinet/in.h> // For network-related definitions
11+
#include <sys/socket.h> // For socket-related definitions
12+
#include <net/if.h> // For interface flags (e.g., IFF_UP)
13+
#include <netdb.h> // For NI_NUMERICHOST, NI_NUMERICSERV, etc.
14+
#include <errno.h> // For EAI_BADFLAGS
15+
#include <sys/un.h> // For AF_UNIX
16+
#include <sys/types.h> // For PF_LOCAL
17+
#endif
18+
819
#ifndef NI_NUMERICHOST
920
#define NI_NUMERICHOST 0x1
1021
#endif

0 commit comments

Comments
 (0)