summaryrefslogtreecommitdiff
path: root/net/sdl_net/files
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-07-25 09:50:34 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-07-25 09:50:34 +0000
commit77938bc2b4d0f3166030a5da986ed120eaaedcf4 (patch)
treec439b7e47a45bf7b3f8d62de1bab198401e06442 /net/sdl_net/files
parentUpdate to 1.2.2. Sam was kind enough to integrate my vgl driver into a (diff)
Update to 1.2.2.
Notes
Notes: svn path=/head/; revision=45467
Diffstat (limited to 'net/sdl_net/files')
-rw-r--r--net/sdl_net/files/patch-SDLnetselect.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/sdl_net/files/patch-SDLnetselect.c b/net/sdl_net/files/patch-SDLnetselect.c
new file mode 100644
index 000000000000..b29640787a83
--- /dev/null
+++ b/net/sdl_net/files/patch-SDLnetselect.c
@@ -0,0 +1,29 @@
+
+$FreeBSD$
+
+--- SDLnetselect.c 2001/07/25 09:44:01 1.1
++++ SDLnetselect.c 2001/07/25 09:45:57
+@@ -175,6 +175,7 @@
+ SOCKET maxfd;
+ int retval;
+ struct timeval tv;
++ struct timeval *tmp;
+ fd_set mask;
+
+ /* Find the largest file descriptor */
+@@ -199,8 +200,14 @@
+ tv.tv_sec = timeout/1000;
+ tv.tv_usec = (timeout%1000)*1000;
+
++ /* XXX: Workaround for a bug in FreeBSD - w/o it in some cases select() chews 100% CPU */
++ if (timeout == ~0)
++ tmp = NULL;
++ else
++ tmp = &tv;
++
+ /* Look! */
+- retval = select(maxfd+1, &mask, NULL, NULL, &tv);
++ retval = select(maxfd+1, &mask, NULL, NULL, tmp);
+ } while ( errno == EINTR );
+
+ /* Mark all file descriptors ready that have data available */