[patch] Correct configure test for sin_len to compile on Tru64 Unix

Petter Reinholdtsen pere at hungry.com
Wed Feb 25 12:44:58 GMT 2004


The last versions of rsync fail to compile on Tru64 Unix (alpha),
because of a typo in configure.in.

The problem is that the code in configure check for sockaddr.sa_len,
while the code uses sockaddr.sin_len.  This patch fixes the problem.
Please include it in the next version of rsync.


diff -ur src-2.6.0/configure.in src-2.6.0-local/configure.in
--- src-2.6.0-local/configure.in        2004-01-01 20:09:16.000000000 +0100
+++ src-2.6.0-foo/configure.in  2004-02-25 13:43:37.000000000 +0100
@@ -367,7 +367,7 @@
 fi


-AC_CHECK_MEMBER([struct sockaddr.sa_len],
+AC_CHECK_MEMBER([struct sockaddr.sin_len],
                [ AC_DEFINE(HAVE_SOCKADDR_LEN) ],
                [],
                [

Without this fix, the compile fail with this error message:

  cc-wrapper -I. -I. -g -DHAVE_CONFIG_H  -c socket.c -o socket.o
  cc: Error: socket.c, line 619: In this statement, "sin_len" is not
    a member of "sock2". (needmember)
          sock2.sin_len = sizeof(sock2);
  --------^
  make: *** [socket.o] Error 1


More information about the rsync mailing list