public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Provide in_addr_t via <sys/types.h>
@ 2016-04-20  8:51 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2016-04-20  8:51 UTC (permalink / raw)
  To: cygwin-cvs, newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3ce1e7901e9b9b8f161df3fad0aa5ef3167d4afb

commit 3ce1e7901e9b9b8f161df3fad0aa5ef3167d4afb
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Mon Apr 18 15:29:24 2016 +0200

    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>

Diff:
---
 newlib/libc/include/sys/types.h   | 5 +++++
 winsup/cygwin/include/cygwin/in.h | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 31f765e..1d2d54c 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -66,7 +66,12 @@ typedef	quad_t *	qaddr_t;
 #include <sys/select.h>
 #  define	physadr		physadr_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 /* __BSD_VISIBLE */
 
 #if __MISC_VISIBLE
 #ifndef _BSDTYPES_DEFINED
diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h
index a64160e..3242d68 100644
--- a/winsup/cygwin/include/cygwin/in.h
+++ b/winsup/cygwin/include/cygwin/in.h
@@ -20,8 +20,12 @@
 
 #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 uint32_t in_addr_t;
 
 #ifndef __INSIDE_CYGWIN_NET__


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-20  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  8:51 [newlib-cygwin] Provide in_addr_t via <sys/types.h> Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).