summaryrefslogtreecommitdiff
path: root/net/tcl-scotty/patches/patch-ae
blob: 0005209415640a9f8b648443310c0ca1c91eaec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ae,v 1.1 2000/10/02 19:27:54 he 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;
+    return (s < 0) {
+	return TNM_SOCKET_ERROR;
+    }
+#ifdef O_NONBLOCK
+    fcntl(s, F_SETFL, O_NONBLOCK);
+#endif
+    return s;
 }
 
 int