opnsense-ports/net-mgmt/ccnet-server/files/patch-lib_net.c
Franco Fichtner eed7de3a28 */*: sync with upstream
Taken from: FreeBSD
2016-12-28 12:42:23 +01:00

14 lines
508 B
C

--- lib/net.c.orig 2016-10-05 10:33:03 UTC
+++ lib/net.c
@@ -152,7 +152,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;
}