Skip to content

Commit 26e56b0

Browse files
committed
ipv6: clean up the header a little
1 parent 9066456 commit 26e56b0

1 file changed

Lines changed: 14 additions & 24 deletions

File tree

src/ipv6.h

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,22 @@
3636
#include "config.h"
3737
#include "if.h"
3838

39-
#ifndef __linux__
40-
#if !defined(__QNX__) && !defined(__sun)
41-
#include <sys/endian.h>
42-
#endif
39+
#ifdef BSD
40+
#include <endian.h>
4341
#include <net/if.h>
44-
#ifndef __sun
4542
#include <netinet6/in6_var.h>
43+
44+
/*
45+
* BSD kernels don't inform userland of DAD results.
46+
* See the discussion here:
47+
* http://mail-index.netbsd.org/tech-net/2013/03/15/msg004019.html
48+
*/
49+
#define IPV6_POLLADDRFLAG
50+
51+
/* This was fixed in NetBSD */
52+
#if (defined(__DragonFly_version) && __DragonFly_version >= 500704) || \
53+
(defined(__NetBSD_Version__) && __NetBSD_Version__ >= 699002000)
54+
#undef IPV6_POLLADDRFLAG
4655
#endif
4756
#endif
4857

@@ -100,25 +109,6 @@
100109
}
101110
#endif
102111

103-
/*
104-
* BSD kernels don't inform userland of DAD results.
105-
* See the discussion here:
106-
* http://mail-index.netbsd.org/tech-net/2013/03/15/msg004019.html
107-
*/
108-
#ifndef __linux__
109-
/* We guard here to avoid breaking a compile on linux ppc-64 headers */
110-
#include <sys/param.h>
111-
#endif
112-
#ifdef BSD
113-
#define IPV6_POLLADDRFLAG
114-
#endif
115-
116-
/* This was fixed in NetBSD */
117-
#if (defined(__DragonFly_version) && __DragonFly_version >= 500704) || \
118-
(defined(__NetBSD_Version__) && __NetBSD_Version__ >= 699002000)
119-
#undef IPV6_POLLADDRFLAG
120-
#endif
121-
122112
/* Of course OpenBSD has their own special name. */
123113
#if !defined(IN6_IFF_TEMPORARY) && defined(IN6_IFF_PRIVACY)
124114
#define IN6_IFF_TEMPORARY IN6_IFF_PRIVACY

0 commit comments

Comments
 (0)