summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/in6.h')
-rw-r--r--sys/netinet6/in6.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index a934e9b..1ca678e 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -219,9 +219,17 @@ extern const struct in6_addr in6addr_linklocal_allrouters;
/*
* Equality
+ * NOTE: Some of kernel programming environment (for example, openbsd/sparc)
+ * does not supply memcmp(). For userland memcmp() is preferred as it is
+ * in ANSI standard.
*/
+#ifdef _KERNEL
+#define IN6_ARE_ADDR_EQUAL(a, b) \
+ (bcmp((a), (b), sizeof(struct in6_addr)) == 0)
+#else
#define IN6_ARE_ADDR_EQUAL(a, b) \
(memcmp((a), (b), sizeof(struct in6_addr)) == 0)
+#endif
/*
* Unspecified
OpenPOWER on IntegriCloud