Skip to content

Commit

Permalink
fix(sockutls): Fix potential macro colission including standard headers
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Dec 20, 2024
1 parent 4745fc8 commit ade9448
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/sock_utils/include/netdb_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
*/
#pragma once

#include "sdkconfig.h"
#ifndef CONFIG_IDF_TARGET_LINUX
#include <netinet/in.h> // For network-related definitions
#include <sys/socket.h> // For socket-related definitions
#include <net/if.h> // For interface flags (e.g., IFF_UP)
#include <netdb.h> // For NI_NUMERICHOST, NI_NUMERICSERV, etc.
#include <errno.h> // For EAI_BADFLAGS
#include <sys/un.h> // For AF_UNIX
#include <sys/types.h> // For PF_LOCAL
#endif

#ifndef NI_NUMERICHOST
#define NI_NUMERICHOST 0x1
#endif
Expand Down

0 comments on commit ade9448

Please sign in to comment.