diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-05-20 22:34:56 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-09-08 22:19:30 +0200 |
commit | 5c6ed111e5ef6e26b1ae8a42da07f4fce3e9567f (patch) | |
tree | 49a6c42c21c810416088a776fcc4391705100ac1 /ripngd | |
parent | sockunion: add hash function (diff) | |
download | frr-5c6ed111e5ef6e26b1ae8a42da07f4fce3e9567f.tar.xz frr-5c6ed111e5ef6e26b1ae8a42da07f4fce3e9567f.zip |
lib: fix "sockunion: add hash function" for BSD (9196caf)
The sockunion_hash() function uses s6_addr32, which is not defined on
BSD systems. (It only works on glibc because we set _GNU_SOURCE)
ripngd/ripng_nexthop.h already contains a workaround for this. Bump
workaround to prefix.h so it's available everywhere.
Reported-by: NetDEF CI System <mwinter@netdef.org>
Fixes: 9196caf ("sockunion: add hash function")
Cc: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripng_nexthop.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ripngd/ripng_nexthop.h b/ripngd/ripng_nexthop.h index 7c0410592..19bd32b50 100644 --- a/ripngd/ripng_nexthop.h +++ b/ripngd/ripng_nexthop.h @@ -41,17 +41,8 @@ extern void ripng_rte_send(struct list *ripng_rte_list, struct interface *ifp, * -1 if A < B **/ static inline int -addr6_cmp(struct in6_addr *A, struct in6_addr *B) { - -#ifndef s6_addr32 -#if defined(SUNOS_5) -/* Some SunOS define s6_addr32 only to kernel */ -#define s6_addr32 _S6_un._S6_u32 -#else -#define s6_addr32 __u6_addr.__u6_addr32 -#endif /* SUNOS_5 */ -#endif /*s6_addr32*/ - +addr6_cmp(struct in6_addr *A, struct in6_addr *B) +{ #define a(i) A->s6_addr32[i] #define b(i) B->s6_addr32[i] |