The implicit int return for main() in the configure test for INET6 is
now a hard error on recent clang, breaking the detection of IPv6 support.
Update this to int main(void) like the other configure tests.

The problem this causes in practice is quite subtle and easy to miss.
ssh is always run with -4 which works fine except when there is only v6
connectivity between a pair of hosts, whereupon ssh between them works
but rsync unexpectedly fails with 'Name has no usable address'.

Signed-off-by: Chris Webb <ch...@arachsys.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ccad7f13..9a766c94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,7 +392,7 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 
support]),
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-main()
+int main(void)
 {
    if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
      exit(1);


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to