summaryrefslogtreecommitdiff
path: root/deps/uv/test/task.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-01-05 20:44:25 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2015-01-05 22:25:20 +0100
commiteaed2a11ecf8d4f8a309f42d6bbc72306c01b755 (patch)
tree59abc7b7d4c1396c5bd60a47f13e694076b5b299 /deps/uv/test/task.h
parent94e147500c5bf457c9101bda8c8020d8ff896708 (diff)
downloadandroid-node-v8-eaed2a11ecf8d4f8a309f42d6bbc72306c01b755.tar.gz
android-node-v8-eaed2a11ecf8d4f8a309f42d6bbc72306c01b755.tar.bz2
android-node-v8-eaed2a11ecf8d4f8a309f42d6bbc72306c01b755.zip
deps: update libuv to 1.2.0
PR-URL: https://github.com/iojs/io.js/pull/237 Reviewed-By: Bert Belder <bertbelder@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'deps/uv/test/task.h')
-rw-r--r--deps/uv/test/task.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/uv/test/task.h b/deps/uv/test/task.h
index e890c77fe1..07584c5299 100644
--- a/deps/uv/test/task.h
+++ b/deps/uv/test/task.h
@@ -39,6 +39,11 @@
# include <sys/resource.h> /* setrlimit() */
#endif
+#ifdef __clang__
+# pragma clang diagnostic ignored "-Wvariadic-macros"
+# pragma clang diagnostic ignored "-Wc99-extensions"
+#endif
+
#define TEST_PORT 9123
#define TEST_PORT_2 9124
@@ -229,4 +234,21 @@ UNUSED static void close_loop(uv_loop_t* loop) {
uv_run(loop, UV_RUN_DEFAULT);
}
+UNUSED static int can_ipv6(void) {
+ uv_interface_address_t* addr;
+ int supported;
+ int count;
+ int i;
+
+ if (uv_interface_addresses(&addr, &count))
+ return 1; /* Assume IPv6 support on failure. */
+
+ supported = 0;
+ for (i = 0; supported == 0 && i < count; i += 1)
+ supported = (AF_INET6 == addr[i].address.address6.sin6_family);
+
+ uv_free_interface_addresses(addr, count);
+ return supported;
+}
+
#endif /* TASK_H_ */