From e061e45abf7dc43c00797096eb7901725bb3e80d Mon Sep 17 00:00:00 2001 From: guenther <> Date: Tue, 10 Jul 2012 11:49:42 +0000 Subject: [PATCH] Instead of pulling in , just copy in the three things that it needed from there: INET_ADDRSTRLEN, INET6_ADDRSTRLEN, and struct in_addr. Add protecting #ifndefs to netinet6?/in6?.h for those. ok deraadt@ --- src/include/arpa/inet.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/include/arpa/inet.h b/src/include/arpa/inet.h index abbd4032..af04ccf7 100644 --- a/src/include/arpa/inet.h +++ b/src/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.h,v 1.12 2012/06/26 06:39:27 guenther Exp $ */ +/* $OpenBSD: inet.h,v 1.13 2012/07/10 11:49:42 guenther Exp $ */ /* * ++Copyright++ 1983, 1993 @@ -63,9 +63,29 @@ #include #include -#include #include +/* + * Buffer lengths for strings containing printable IP addresses + */ +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif + +#ifndef _IN_ADDR_DECLARED +#define _IN_ADDR_DECLARED +/* + * IP Version 4 Internet address (a structure for historical reasons) + */ +struct in_addr { + in_addr_t s_addr; +}; +#endif + + __BEGIN_DECLS in_addr_t inet_addr(const char *); char *inet_ntoa(struct in_addr);