diff options
author | Wayne Davison <wayned@samba.org> | 2003-01-11 02:05:56 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2003-01-11 02:05:56 +0000 |
commit | aaf375d0a5bc139efb3998a9af4865aab980ed26 (patch) | |
tree | 5422cbc915583a222200e8baf6a930d69766ca02 /clientname.c | |
parent | 9680f811f6b7763c594ab6f4c4b139df456e2620 (diff) | |
download | rsync-aaf375d0a5bc139efb3998a9af4865aab980ed26.tar.gz rsync-aaf375d0a5bc139efb3998a9af4865aab980ed26.tar.bz2 rsync-aaf375d0a5bc139efb3998a9af4865aab980ed26.zip |
The inet_pton() man page says we need to pass in a pointer to a
struct in_addr, which means passing &sin.sin_addr instead of
&sin.sin_addr.s_addr. Also changed the AF_INET6 version to pass
&sin6.sin6_addr. Hopefully this will fix UNICOS and not break
anyone else.
Diffstat (limited to 'clientname.c')
-rw-r--r-- | clientname.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clientname.c b/clientname.c index 6c86c122..661d4ab6 100644 --- a/clientname.c +++ b/clientname.c @@ -130,7 +130,7 @@ char *client_name(int fd) ssp = (struct sockaddr_storage *) &sin6; ss_len = sizeof sin6; memset(ssp, 0, ss_len); - inet_pton(AF_INET6, addr, &sin6.sin6_addr.s6_addr); + inet_pton(AF_INET6, addr, &sin6.sin6_addr); sin6.sin6_family = AF_INET6; } else #endif @@ -138,7 +138,7 @@ char *client_name(int fd) ssp = (struct sockaddr_storage *) &sin; ss_len = sizeof sin; memset(ssp, 0, ss_len); - inet_pton(AF_INET, addr, &sin.sin_addr.s_addr); + inet_pton(AF_INET, addr, &sin.sin_addr); sin.sin_family = AF_INET; } |