$NetBSD: patch-ae,v 1.2 2000/10/13 18:59:31 jwise Exp $

--- tnmUnixSocket.c.orig	Wed Sep 18 23:37:21 1996
+++ tnmUnixSocket.c	Mon Oct  2 21:07:45 2000
@@ -13,6 +13,8 @@
 #include "tnmInt.h"
 #include "tnmPort.h"
 
+#include <fcntl.h>
+
 int
 TnmSocket(domain, type, protocol)
     int domain;
@@ -20,7 +22,13 @@
     int protocol;
 {
     int s = socket(domain, type, protocol);
-    return (s < 0) ? TNM_SOCKET_ERROR : s;
+    if (s < 0) {
+	return TNM_SOCKET_ERROR;
+    }
+#ifdef O_NONBLOCK
+    fcntl(s, F_SETFL, O_NONBLOCK);
+#endif
+    return s;
 }
 
 int