}
#ifdef __FreeBSD__
-static int net_connect_ip_freebsd(const struct ip_addr *ip, unsigned int port,
- const struct ip_addr *my_ip);
+static int
+net_connect_ip_full_freebsd(const struct ip_addr *ip, unsigned int port,
+ const struct ip_addr *my_ip, bool blocking);
-int net_connect_ip(const struct ip_addr *ip, unsigned int port,
- const struct ip_addr *my_ip)
+static int net_connect_ip_full(const struct ip_addr *ip, unsigned int port,
+ const struct ip_addr *my_ip, bool blocking)
{
int fd, try;
for (try = 0;;) {
- fd = net_connect_ip_freebsd(ip, port, my_ip);
+ fd = net_connect_ip_full_freebsd(ip, port, my_ip, blocking);
if (fd != -1 || ++try == 5 ||
(errno != EADDRINUSE && errno != EACCES))
break;
return fd;
}
/* then some kludging: */
-#define net_connect_ip net_connect_ip_freebsd
-static
+#define net_connect_ip_full net_connect_ip_full_freebsd
#endif
static int net_connect_ip_full(const struct ip_addr *ip, unsigned int port,
return fd;
}
+#ifdef __FreeBSD__
+# undef net_connect_ip_full
+#endif
int net_connect_ip(const struct ip_addr *ip, unsigned int port,
const struct ip_addr *my_ip)