#ifdef DARWIN
socket_set_nosigpipe (ret);
#endif
- socket_set_nodelay (ret);
+#ifdef AF_UNIX
+ if (address->sa_family != AF_UNIX)
+#endif
+ socket_set_nodelay (ret);
return ret;
}
#ifdef DARWIN
socket_set_nosigpipe (ret);
#endif
- if (type == SOCK_STREAM)
+ if ( (type == SOCK_STREAM)
+#ifdef AF_UNIX
+ && (domain != AF_UNIX)
+#endif
+ )
socket_set_nodelay (ret);
return ret;
}
to->nsds = nfds;
}
+
+/**
+ * Set a native fd in a set
+ *
+ * @param to destination
+ * @param nfd native FD to set
+ */
+void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to,
+ int nfd)
+{
+ FD_SET (nfd, &to->sds);
+ to->nsds = GNUNET_MAX (nfd + 1, to->nsds);
+}
+
+
/**
* Add a file handle to the fd set
* @param fds fd set