diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/if.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/in.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/socket.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/netdb.h | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h index 8f76e836e..d99cda7bc 100644 --- a/winsup/cygwin/include/cygwin/if.h +++ b/winsup/cygwin/include/cygwin/if.h @@ -111,10 +111,12 @@ struct ifconf #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ +#ifndef __INSIDE_CYGWIN_NET__ extern unsigned if_nametoindex (const char *); extern char *if_indextoname (unsigned, char *); extern struct if_nameindex *if_nameindex (void); extern void if_freenameindex (struct if_nameindex *); +#endif #ifdef __cplusplus }; diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h index 30ac623a8..49957293d 100644 --- a/winsup/cygwin/include/cygwin/in.h +++ b/winsup/cygwin/include/cygwin/in.h @@ -23,6 +23,8 @@ typedef uint16_t in_port_t; typedef uint32_t in_addr_t; +#ifndef __INSIDE_CYGWIN_NET__ + /* Standard well-defined IP protocols. If you ever add one here, don't forget to define it below. */ enum @@ -260,4 +262,6 @@ struct sockaddr_in #ifdef AF_INET6 #include <cygwin/in6.h> #endif +#endif + #endif /* _CYGWIN_IN_H */ diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index 41c2eb5f8..921172ecf 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -26,6 +26,7 @@ typedef int socklen_t; typedef uint16_t sa_family_t; +#ifndef __INSIDE_CYGWIN_NET__ struct sockaddr { sa_family_t sa_family; /* address family, AF_xxx */ char sa_data[14]; /* 14 bytes of protocol address */ @@ -44,6 +45,7 @@ struct sockaddr_storage { int64_t __ss_align; char _ss_pad2[_SS_PAD2SIZE]; }; +#endif #include <asm/socket.h> /* arch-dependent defines */ #include <cygwin/sockios.h> /* the SIOCxxx I/O controls */ @@ -269,8 +271,10 @@ struct OLD_msghdr #define MCAST_JOIN_SOURCE_GROUP 45 #define MCAST_LEAVE_SOURCE_GROUP 46 +#ifndef __INSIDE_CYGWIN_NET__ #define MCAST_INCLUDE 0 #define MCAST_EXCLUDE 1 +#endif /* Old WinSock1 values, needed internally */ #ifdef __INSIDE_CYGWIN__ diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h index f59a780f0..e4b85c6a7 100644 --- a/winsup/cygwin/include/netdb.h +++ b/winsup/cygwin/include/netdb.h @@ -117,6 +117,7 @@ struct rpcent { int r_number; /* rpc program number */ }; +#ifndef __INSIDE_CYGWIN_NET__ struct addrinfo { int ai_flags; /* input flags */ int ai_family; /* address family of socket */ @@ -127,6 +128,7 @@ struct addrinfo { struct sockaddr *ai_addr; /* socket address of socket */ struct addrinfo *ai_next; /* pointer to next in list */ }; +#endif /* * Error return codes from gethostbyname() and gethostbyaddr() |