summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/include/sys/types.h5
-rw-r--r--winsup/cygwin/include/cygwin/in.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 1d2d54c37..dbd6f2b89 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 3242d6878..9d7331d30 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__