blob: 37f1311bbc6ffd6f6dc416b41a226560adac5cd3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- lib/net.c.orig 2015-09-21 03:42:11 UTC
+++ lib/net.c
@@ -157,7 +157,11 @@ ccnet_net_bind_tcp (int port, int nonblo
snprintf (buf, sizeof(buf), "%d", port);
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
+#else
if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
+#endif
ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
return -1;
}
|