about summary refs log tree commit diff
path: root/Src/zsh_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/zsh_system.h')
-rw-r--r--Src/zsh_system.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index e68fd62f9..6887a135b 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -708,7 +708,10 @@ struct timezone {
 #endif
 
 #ifndef HAVE_MEMMOVE
-# define memmove(dest, src, len) bcopy((src), (dest), (len))
+# ifndef memmove
+static char *zmmv;
+# define memmove(dest, src, len) (bcopy((src), zmmv = (dest), (len)), zmmv)
+# endif
 #endif
 
 #ifndef offsetof