handle broken readdir() on Solaris 2.6 (it returns the name offset by
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index 3418b81..1491046 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -290,6 +290,20 @@ static inline int flist_up(struct file_list *flist, int i)
        return i;
 }
 
+#if HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# define dirent direct
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
 
 #include "byteorder.h"
 #include "version.h"
@@ -306,21 +320,6 @@ extern char *sys_errlist[];
 # define strrchr                rindex
 #endif
 
-#if HAVE_DIRENT_H
-# include <dirent.h>
-#else
-# define dirent direct
-# if HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif
-
 #ifndef HAVE_ERRNO_DECL
 extern int errno;
 #endif