Jos Backus
2002-Feb-12 07:01 UTC
socket.c: HAVE_SOCKADDR_LEN misspelt as HAVE_SOCK_SIN_LEN
This causes a compile error on Solaris. Fix: Index: socket.c ==================================================================RCS file: /cvsroot/rsync/socket.c,v retrieving revision 1.73 diff -u -r1.73 socket.c --- socket.c 25 Jan 2002 02:13:05 -0000 1.73 +++ socket.c 11 Feb 2002 20:04:33 -0000 @@ -590,7 +590,7 @@ if ((listener = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto failed; memset(&sock2, 0, sizeof(sock2)); -#ifdef HAVE_SOCK_SIN_LEN +#ifdef HAVE_SOCKADDR_LEN sock2.sin_len = sizeof(sock2); #endif sock2.sin_family = PF_INET; -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;
Dave Dykstra
2002-Feb-14 05:43 UTC
socket.c: HAVE_SOCKADDR_LEN misspelt as HAVE_SOCK_SIN_LEN
On Mon, Feb 11, 2002 at 12:00:55PM -0801, Jos Backus wrote:> This causes a compile error on Solaris. Fix: > > Index: socket.c > ==================================================================> RCS file: /cvsroot/rsync/socket.c,v > retrieving revision 1.73 > diff -u -r1.73 socket.c > --- socket.c 25 Jan 2002 02:13:05 -0000 1.73 > +++ socket.c 11 Feb 2002 20:04:33 -0000 > @@ -590,7 +590,7 @@ > if ((listener = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto failed; > > memset(&sock2, 0, sizeof(sock2)); > -#ifdef HAVE_SOCK_SIN_LEN > +#ifdef HAVE_SOCKADDR_LEN > sock2.sin_len = sizeof(sock2); > #endif > sock2.sin_family = PF_INET;Since HAVE_SOCK_SIN_LEN isn't defined anywhere I don't see how that would be a compile error but I expect it would be a runtime error on systems that require sin_len to be set. HAVE_SOCKADDR_LEN is getting set by configure when needed and clientname.c uses it properly so I went ahead and checked this into CVS. - Dave Dykstra
Reasonably Related Threads
- Tru64 Unix patch for rsync 2.5.6.
- [patch] Correct configure test for sin_len to compile on Tru64 Unix
- [nbdkit PATCH] tests: Swap nbdkit process order in test-nbd-tls-psk.sh
- [nbdkit PATCH v2] tests: Accommodate qemu-img 4.1 output change
- [nbdkit PATCH] nozero: Add notrim mode