diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-18 15:29:25 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-19 23:40:53 +0200 |
commit | 7d22dc338d5aeb61f049776b85b2c87b94f7878d (patch) | |
tree | acd430c530dd1ce737cb486b31e172222e34123c | |
parent | 3ce1e7901e9b9b8f161df3fad0aa5ef3167d4afb (diff) | |
download | newlib-7d22dc338d5aeb61f049776b85b2c87b94f7878d.zip newlib-7d22dc338d5aeb61f049776b85b2c87b94f7878d.tar.gz newlib-7d22dc338d5aeb61f049776b85b2c87b94f7878d.tar.bz2 |
Provide in_port_t via <sys/types.h>
Provide in_port_t via <sys/types.h> if __BSD_VISIBLE for BSD
compatibility.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
-rw-r--r-- | newlib/libc/include/sys/types.h | 5 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/in.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 1d2d54c..dbd6f2b 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -71,6 +71,11 @@ typedef quad_t * qaddr_t; typedef __uint32_t in_addr_t; /* base type for internet address */ #define _IN_ADDR_T_DECLARED #endif + +#ifndef _IN_PORT_T_DECLARED +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED +#endif #endif /* __BSD_VISIBLE */ #if __MISC_VISIBLE diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h index 3242d68..9d7331d 100644 --- a/winsup/cygwin/include/cygwin/in.h +++ b/winsup/cygwin/include/cygwin/in.h @@ -25,7 +25,10 @@ typedef __uint32_t in_addr_t; #define _IN_ADDR_T_DECLARED #endif -typedef uint16_t in_port_t; +#ifndef _IN_PORT_T_DECLARED +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED +#endif #ifndef __INSIDE_CYGWIN_NET__ |