Fix bcopy() to allow memory area overlap

Under Solaris bcopy() allows overlapping memory areas so we
must use memmove() instead of memcpy().

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Ricardo M. Correia 2010-07-20 13:48:51 -07:00 committed by Brian Behlendorf
parent 22cd0f19b1
commit 9dd5d138b2

View File

@ -110,7 +110,7 @@
/* Map some simple functions.
*/
#define bzero(ptr,size) memset(ptr,0,size)
#define bcopy(src,dest,size) memcpy(dest,src,size)
#define bcopy(src,dest,size) memmove(dest,src,size)
#define bcmp(src,dest,size) memcmp((src), (dest), (size_t)(size))
/* Dtrace probes do not exist in the linux kernel */