Hit this on sparc64. io_read_ulong() calls io_read_int() which already
does the le32toh() call. So skip the 2nd le32toh() call here.
With this openrsync works a lot better.

-- 
:wq Claudio

Index: io.c
===================================================================
RCS file: /cvs/src/usr.bin/rsync/io.c,v
retrieving revision 1.21
diff -u -p -r1.21 io.c
--- io.c        28 Dec 2021 11:59:48 -0000      1.21
+++ io.c        12 Apr 2022 12:29:23 -0000
@@ -585,8 +585,9 @@ io_read_ulong(struct sess *sess, int fd,
        if (!io_read_int(sess, fd, &sval)) {
                ERRX1("io_read_int");
                return 0;
-       } else if (sval != -1) {
-               *val = (uint64_t)le32toh(sval);
+       }
+       if (sval != -1) {
+               *val = sval;
                return 1;
        }
 

Reply via email to