pkgsrc/net/tcl-scotty/patches/patch-ae
jwise 348152bf7b Fix an obvious syntax error in patch-ae.
People should *really* test code before committing it.  _Especially_ in
packages which they are not the maintainer of...
2000-10-13 18:59:30 +00:00

28 lines
564 B
Text

$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