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
Twiddle the trailing output in non-live mode.
[rsync/rsync.git]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
9079093
..
c2f534e
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-32,6
+32,8
@@
**/
#include "rsync.h"
**/
#include "rsync.h"
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
extern char *bind_address;
extern int default_af_hint;
extern char *bind_address;
extern int default_af_hint;
@@
-394,7
+396,8
@@
static int *open_socket_in(int type, int port, const char *bind_addr,
if (bind(s, resp->ai_addr, resp->ai_addrlen) < 0) {
/* Nope, try another */
int r = asprintf(&errmsgs[ecnt++],
if (bind(s, resp->ai_addr, resp->ai_addrlen) < 0) {
/* Nope, try another */
int r = asprintf(&errmsgs[ecnt++],
- "bind() failed: %s\n", strerror(errno));
+ "bind() failed: %s (address-family %d)\n",
+ strerror(errno), (int)resp->ai_family);
if (r < 0)
out_of_memory("open_socket_in");
close(s);
if (r < 0)
out_of_memory("open_socket_in");
close(s);