Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use mkstemp() if the OS has open64() but not mkstemp64().
[rsync/rsync.git]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
549d40d
..
29fb2dc
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-369,8
+369,12
@@
static int *open_socket_in(int type, int port, const char *bind_address,
#ifdef IPV6_V6ONLY
if (resp->ai_family == AF_INET6) {
#ifdef IPV6_V6ONLY
if (resp->ai_family == AF_INET6) {
- setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
- (char *)&one, sizeof one);
+ if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+ (char *)&one, sizeof one) < 0
+ && default_af_hint != AF_INET6) {
+ close(s);
+ continue;
+ }
}
#endif
}
#endif