summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-07-10 11:49:43 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-07-10 11:49:43 +0000
commit8a386e18f9ebed887bd888ffd5bede8694b2ef62 (patch)
tree7455b7625888c2a09dfc87b7a04f5fb4da0b22ec /sys
parent91834dd207f4744e52810b7c592606d9b94319f2 (diff)
Instead of <arpa/inet.h> pulling in <netinet/in.h>, 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@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/in.h7
-rw-r--r--sys/netinet6/in6.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 11ef0ff92f6..18f275bb84d 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.91 2012/06/26 06:39:27 guenther Exp $ */
+/* $OpenBSD: in.h,v 1.92 2012/07/10 11:49:42 guenther Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -141,12 +141,15 @@
#define IPPORT_HIFIRSTAUTO 49152
#define IPPORT_HILASTAUTO 65535
+#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
/* last return value of *_input(), meaning "all job for this pkt is done". */
#define IPPROTO_DONE 257
@@ -351,7 +354,9 @@ struct ip_mreq {
/*
* Buffer lengths for strings containing printable IP addresses
*/
+#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
+#endif
#if __BSD_VISIBLE
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 72fd35c3139..664bca96119 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.h,v 1.56 2012/06/26 06:39:27 guenther Exp $ */
+/* $OpenBSD: in6.h,v 1.57 2012/07/10 11:49:42 guenther Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@@ -94,7 +94,9 @@ struct in6_addr {
#define s6_addr32 __u6_addr.__u6_addr32
#endif
+#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
+#endif
/*
* Socket address for IPv6