[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] 17/22 getaddrinfo



This enables the use of getaddrinfo under Windows (requires inclusion of the "getaddrinfo.h" header from gnulib).

AI_ADDRCONFIG isn't supported by the gnulib emulation of getaddrinfo. There is some controversy as to whether this flag actually does anything useful. http://www.google.co.uk/search?q=AI_ADDRCONFIG

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: src/remote_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
retrieving revision 1.44
diff -u -r1.44 remote_internal.c
--- src/remote_internal.c	6 Dec 2007 12:05:35 -0000	1.44
+++ src/remote_internal.c	7 Dec 2007 10:59:51 -0000
@@ -51,6 +65,8 @@
 #endif
 #include <libxml/uri.h>
 
+#include "getaddrinfo.h"
+
 #include "internal.h"
 #include "driver.h"
 #include "getaddrinfo.h"
@@ -492,7 +509,9 @@
         struct addrinfo hints;
         memset (&hints, 0, sizeof hints);
         hints.ai_socktype = SOCK_STREAM;
+#ifdef AI_ADDRCONFIG
         hints.ai_flags = AI_ADDRCONFIG;
+#endif
         int e = getaddrinfo (priv->hostname, port, &hints, &res);
         if (e != 0) {
             error (conn, VIR_ERR_INVALID_ARG, gai_strerror (e));

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]