Change the implementation of memmove in lib/compat.c to call bcopy instead
authorDavid Dykstra <dwd@samba.org>
Fri, 12 Feb 1999 17:27:22 +0000 (17:27 +0000)
committerDavid Dykstra <dwd@samba.org>
Fri, 12 Feb 1999 17:27:22 +0000 (17:27 +0000)
of memcpy because bcopy is guaranteed to work with overlapping memory and
memcpy is not.  Bug fix for PR#1584 in which log entries in the rsync
daemon log on Sunos 4.1.4 were garbled.

lib/compat.c

index 9b411cd..1bf46b9 100644 (file)
@@ -72,7 +72,7 @@
 #ifndef HAVE_MEMMOVE
  void *memmove(void *dest, const void *src, size_t n)
 {
-       memcpy(dest, src, n);
+       bcopy((char *) src, (char *) dest, n);
        return dest;
 }
 #endif