Tru64 Unix patch for rsync 2.5.6.

jw schultz jw at pegasys.ws
Tue Jul 22 17:45:25 EST 2003


No one else has done anything about this.

This doesn't quite look right to me.  The structure we need
to actually use HAVE_SOCKADDR_LEN for is type sockaddr_in,
not sockaddr.  Further, the members of sockaddr appear to
have sa_ prefixes. Only sockaddr_in members have the sin_
prefix.  So either we should be checking sockaddr.sa_len
(which we are) or sockaddr_in.sin_len.

On Fri, May 16, 2003 at 05:35:19PM +0200, Petter Reinholdtsen wrote:
> 
> Version 2.5.6 of rsync fail to compile on Tru64 Unix v5.1 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
>   error: compile failed.
> 
> The problem seem to be that configure defines HAVE_SOCKADDR_LEN if
> struct sockaddr.sa_len exists, while the code uses member sin_len
> instead of sa_len.  Trying to rename sin_len to sa_len did not help.
> It only gave this familiar message:
> 
>   cc: Error: socket.c, line 620: In this statement, "sa_len" is not a
>     member of "sock2". (needmember)
>           sock2.sa_len = sizeof(sock2);
>   --------^
>   make: *** [socket.o] Error 1
> 
> I'm not sure why sa_len is available when I test the code fragment
> used in configure.  I was able to compile the problem when I manually
> updated config.h to avoid defining "HAVE_SOCKADDR_LEN".
> 
> Changing the configure file to check for sin_len instead of sa_len
> made the code compile without manual editing config.h.  Here is a
> patch to fix the problem:
> 
> diff -ur src-2.5.6/configure.in src-2.5.6-local/configure.in
> --- src-2.5.6/configure.in      2003-01-28 06:27:40.000000000 +0100
> +++ src-2.5.6-local/configure.in        2003-05-16 17:22:09.000000000 +0200
> @@ -370,7 +370,7 @@
>  fi
> 
> 
> -AC_CHECK_MEMBER([struct sockaddr.sa_len],
> +AC_CHECK_MEMBER([struct sockaddr.sin_len],
>                 [ AC_DEFINE(HAVE_SOCKADDR_LEN) ],
>                 [],
>                 [
> 
> Using this patch the code compiled on RedHat 7.3, Tru64 Unix 5.1,
> HP/UX 11.00 and 11.22, Mac OS X, AIX 5.2, Irix 6.15 and Solaris 7 and
> 8.  The sin_len member was missing on all of these archs.  The sa_len
> member seem to only be available on Mac OS X and AIX 5.1 (based on
> compile logs for v2.5.5).
> 
> Please include the patch in the next version of rsync.
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
> 

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list