Changeset View
Changeset View
Standalone View
Standalone View
net-mgmt/seafile/files/patch-lib_net.c
--- lib/net.c.orig 2015-01-28 00:52:56.000000000 -0500 | --- lib/net.c.orig 2015-09-21 03:42:11 UTC | ||||
+++ lib/net.c 2015-01-28 00:55:31.000000000 -0500 | +++ lib/net.c | ||||
@@ -157,7 +157,11 @@ | @@ -157,7 +157,11 @@ ccnet_net_bind_tcp (int port, int nonblo | ||||
snprintf (buf, sizeof(buf), "%d", port); | snprintf (buf, sizeof(buf), "%d", port); | ||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) | +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) | ||||
+ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) { | + if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) { | ||||
+#else | +#else | ||||
if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) { | if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) { | ||||
+#endif | +#endif | ||||
ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n)); | ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n)); | ||||
return -1; | return -1; | ||||
} | } |