From 3e4cb7353ede7e585e56a1dec5a9b64630722844 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 30 May 2016 13:37:11 +0000 Subject: Add missing types and constants to . 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 to achieve that. --- include/netdb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/netdb.h') diff --git a/include/netdb.h b/include/netdb.h index a73d2af..3fa5ff3 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -60,6 +60,16 @@ #include #include +#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). -- cgit v1.1