summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
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/netgraph
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/netgraph')
-rw-r--r--sys/netgraph/atm/uni/ng_uni_cust.h2
-rw-r--r--sys/netgraph/ng_l2tp.c3
2 files changed, 0 insertions, 5 deletions
diff --git a/sys/netgraph/atm/uni/ng_uni_cust.h b/sys/netgraph/atm/uni/ng_uni_cust.h
index cf9d354..4336e57 100644
--- a/sys/netgraph/atm/uni/ng_uni_cust.h
+++ b/sys/netgraph/atm/uni/ng_uni_cust.h
@@ -146,5 +146,3 @@ size_t unimem_sizes[UNIMEM_TYPES] = { \
[UNIMEM_CALL] = sizeof(struct call), \
[UNIMEM_PARTY] = sizeof(struct party) \
};
-
-#define memmove(T, F, L) bcopy((F), (T), (L))
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index 46dcba9..a5bb628 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -342,9 +342,6 @@ NETGRAPH_INIT(l2tp, &ng_l2tp_typestruct);
#define L2TP_SEQ_CHECK(x) do { } while (0)
#endif
-/* memmove macro */
-#define memmove(d, s, l) bcopy(s, d, l)
-
/* Whether to use m_copypacket() or m_dup() */
#define L2TP_COPY_MBUF m_copypacket
OpenPOWER on IntegriCloud