Tweaked some whitespace to match the latest version from autoconf.
[rsync/rsync.git] / socket.c
index 9079093..c2f534e 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -32,6 +32,8 @@
  **/
 
 #include "rsync.h"
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
 
 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++],
-                               "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);