Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2016 13:37:11 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300996 - head/include
Message-ID:  <201605301337.u4UDbBI9096370@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Mon May 30 13:37:11 2016
New Revision: 300996
URL: https://svnweb.freebsd.org/changeset/base/300996

Log:
  Add missing types and constants to <netdb.h>.
  
  According to POSIX, the netdb.h header must also provide in_addr_t and
  in_port_t. It should also provide IPPORT_RESERVED. Copy over the
  necessary bits from <netinet/in.h> to achieve that.

Modified:
  head/include/netdb.h

Modified: head/include/netdb.h
==============================================================================
--- head/include/netdb.h	Mon May 30 11:18:39 2016	(r300995)
+++ head/include/netdb.h	Mon May 30 13:37:11 2016	(r300996)
@@ -60,6 +60,16 @@
 #include <sys/cdefs.h>
 #include <sys/_types.h>
 
+#ifndef _IN_ADDR_T_DECLARED
+typedef	__uint32_t	in_addr_t;
+#define	_IN_ADDR_T_DECLARED
+#endif
+
+#ifndef _IN_PORT_T_DECLARED
+typedef	__uint16_t	in_port_t;
+#define	_IN_PORT_T_DECLARED
+#endif
+
 #ifndef _SIZE_T_DECLARED
 typedef	__size_t	size_t;
 #define	_SIZE_T_DECLARED
@@ -131,6 +141,8 @@ struct addrinfo {
 	struct	addrinfo *ai_next;	/* next structure in linked list */
 };
 
+#define	IPPORT_RESERVED	1024
+
 /*
  * Error return codes from gethostbyname() and gethostbyaddr()
  * (left in h_errno).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605301337.u4UDbBI9096370>