Changed most instances of "remote_version" to "protocol_version", and
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index 52b3e70..3d10af6 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -124,6 +124,10 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 };
 #include <stdlib.h>
 #endif
 
+#if defined(HAVE_MALLOC_H) && (defined(HAVE_MALLINFO) || !defined(HAVE_STDLIB_H))
+#include <malloc.h>
+#endif
+
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -132,10 +136,6 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 };
 #include <string.h>
 #endif
 
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
 #include <time.h>
@@ -196,10 +196,6 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 };
 #include <glob.h>
 #endif
 
-#ifdef HAVE_MALLOC_H
-#  include <malloc.h>
-#endif
-
 /* these are needed for the uid/gid mapping code */
 #include <pwd.h>
 #include <grp.h>