From 9dd5d138b2326201f4258b126f2bfdb0b4c6138d Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 20 Jul 2010 13:48:51 -0700 Subject: [PATCH] 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 --- include/sys/sysmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.40.0