From: Ricardo M. Correia Date: Tue, 20 Jul 2010 20:48:51 +0000 (-0700) Subject: Fix bcopy() to allow memory area overlap X-Git-Tag: spl-0.5.0~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dd5d138b2326201f4258b126f2bfdb0b4c6138d;p=spl 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 Signed-off-by: Brian Behlendorf --- diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index eccfee3..eded9ab 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -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 */