Browse Source

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@
OPENBSD_5_2
guenther 12 years ago
parent
commit
e061e45abf
1 changed files with 22 additions and 2 deletions
  1. +22
    -2
      src/include/arpa/inet.h

+ 22
- 2
src/include/arpa/inet.h View File

@ -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 <sys/cdefs.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <machine/endian.h>
/*
* 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);


Loading…
Cancel
Save