summaryrefslogtreecommitdiffstats
path: root/sys/cddl/compat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-28 16:21:25 +0000
committered <ed@FreeBSD.org>2009-02-28 16:21:25 +0000
commit322413c46c002718cc357647800a58347e6a7535 (patch)
treed48f20a6281397e8e474df818dbfe4b4795b419e /sys/cddl/compat
parent1c22aa10afa2d0933dda4f1fd7bbae1cc4429bf6 (diff)
downloadFreeBSD-src-322413c46c002718cc357647800a58347e6a7535.zip
FreeBSD-src-322413c46c002718cc357647800a58347e6a7535.tar.gz
Add memmove() to the kernel, making the kernel compile with Clang.
When copying big structures, LLVM generates calls to memmove(), because it may not be able to figure out whether structures overlap. This caused linker errors to occur. memmove() is now implemented using bcopy(). Ideally it would be the other way around, but that can be solved in the future. On ARM we don't do add anything, because it already has memmove(). Discussed on: arch@ Reviewed by: rdivacky
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r--sys/cddl/compat/opensolaris/sys/sysmacros.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/sysmacros.h b/sys/cddl/compat/opensolaris/sys/sysmacros.h
index 7f4885b..3c1e9b1 100644
--- a/sys/cddl/compat/opensolaris/sys/sysmacros.h
+++ b/sys/cddl/compat/opensolaris/sys/sysmacros.h
@@ -97,10 +97,6 @@ extern "C" {
#define P2SAMEHIGHBIT_TYPED(x, y, type) \
(((type)(x) ^ (type)(y)) < ((type)(x) & (type)(y)))
-#ifdef _KERNEL
-#define memmove(dst, src, size) bcopy((src), (dst), (size))
-#endif
-
/*
* Find highest one bit set.
* Returns bit number + 1 of highest bit that is set, otherwise returns 0.
OpenPOWER on IntegriCloud