From b8c427c94a1feeb02a22ec92cb2c9d0252bef1ec Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 13 Jul 2005 12:49:56 +0000 Subject: [PATCH] Define struct in_addr in both, arpa/inet.h and netinet/in.h, as required by SUS. MFC after 3 days. --- include/arpa/inet.h | 12 ++++++++++-- sys/netinet/in.h | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 6cb65a45e3..57f224f465 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -55,7 +55,7 @@ * @(#)inet.h 8.1 (Berkeley) 6/2/93 * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $ * $FreeBSD: src/include/arpa/inet.h,v 1.11.2.1 2001/04/21 14:53:03 ume Exp $ - * $DragonFly: src/include/arpa/inet.h,v 1.4 2004/08/23 16:03:44 joerg Exp $ + * $DragonFly: src/include/arpa/inet.h,v 1.5 2005/07/13 12:49:56 joerg Exp $ */ #ifndef _ARPA_INET_H_ @@ -66,7 +66,15 @@ #include #include -struct in_addr; +#ifndef _STRUCT_IN_ADDR_DECLARED +#define _STRUCT_IN_ADDR_DECLARED +/* + * Internet address (a structure for historical reasons) + */ +struct in_addr { + in_addr_t s_addr; +}; +#endif /* XXX all new diversions!! argh!! */ #define inet_addr __inet_addr diff --git a/sys/netinet/in.h b/sys/netinet/in.h index e79fe684ef..6c0491befe 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -32,7 +32,7 @@ * * @(#)in.h 8.3 (Berkeley) 1/3/94 * $FreeBSD: src/sys/netinet/in.h,v 1.48.2.10 2003/08/24 08:24:38 hsu Exp $ - * $DragonFly: src/sys/netinet/in.h,v 1.10 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/in.h,v 1.11 2005/07/13 12:49:56 joerg Exp $ */ #ifndef _NETINET_IN_H_ @@ -243,12 +243,15 @@ */ #define IPPORT_RESERVEDSTART 600 +#ifndef _STRUCT_IN_ADDR_DECLARED +#define _STRUCT_IN_ADDR_DECLARED /* * Internet address (a structure for historical reasons) */ struct in_addr { in_addr_t s_addr; }; +#endif /* * Definitions of bits in internet address integers. -- 2.41.0