summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authoritojun <itojun@FreeBSD.org>1999-11-29 08:19:01 +0000
committeritojun <itojun@FreeBSD.org>1999-11-29 08:19:01 +0000
commit6081138a553e384c735ad487b4a497fb76cacd8c (patch)
tree9093beda7ae002b654b6e400a641a0616794b6c7 /sys/netinet6
parenteb36f813ac44e4d33323dc35bbac1794cd8c6b84 (diff)
downloadFreeBSD-src-6081138a553e384c735ad487b4a497fb76cacd8c.zip
FreeBSD-src-6081138a553e384c735ad487b4a497fb76cacd8c.tar.gz
there's no memcmp() in kernel, use bcmp() instead.
in userland memcmp() is preferred for ANSI preference. (from KAME repository)
Diffstat (limited to 'sys/netinet6')
-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