Provide in_addr_t via <sys/types.h>

Provide in_addr_t via <sys/types.h> if __BSD_VISIBLE for BSD
compatibility.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber 2016-04-18 15:29:24 +02:00 committed by Corinna Vinschen
parent e03a7056a6
commit 3ce1e7901e
2 changed files with 10 additions and 1 deletions

View File

@ -66,7 +66,12 @@ typedef quad_t * qaddr_t;
#include <sys/select.h> #include <sys/select.h>
# define physadr physadr_t # define physadr physadr_t
# define quad quad_t # define quad quad_t
#ifndef _IN_ADDR_T_DECLARED
typedef __uint32_t in_addr_t; /* base type for internet address */
#define _IN_ADDR_T_DECLARED
#endif #endif
#endif /* __BSD_VISIBLE */
#if __MISC_VISIBLE #if __MISC_VISIBLE
#ifndef _BSDTYPES_DEFINED #ifndef _BSDTYPES_DEFINED

View File

@ -20,8 +20,12 @@
#include <cygwin/socket.h> #include <cygwin/socket.h>
#ifndef _IN_ADDR_T_DECLARED
typedef __uint32_t in_addr_t;
#define _IN_ADDR_T_DECLARED
#endif
typedef uint16_t in_port_t; typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;
#ifndef __INSIDE_CYGWIN_NET__ #ifndef __INSIDE_CYGWIN_NET__