summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2001-12-08 17:08:07 +0000
committerfgsch <fgsch@openbsd.org>2001-12-08 17:08:07 +0000
commit520fd24d37d1946b86aca7c692e38382d2dbae89 (patch)
tree1a85dfbdf481ac596d4fd39f2366355a61804334 /lib/libpthread
parentDo not compile the pnp attachments unless they're requested; deraadt@ ok (diff)
downloadwireguard-openbsd-520fd24d37d1946b86aca7c692e38382d2dbae89.tar.xz
wireguard-openbsd-520fd24d37d1946b86aca7c692e38382d2dbae89.zip
sync with freebsd.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/uthread/uthread_kevent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_kevent.c b/lib/libpthread/uthread/uthread_kevent.c
index 909f92366db..fdbd61169b4 100644
--- a/lib/libpthread/uthread/uthread_kevent.c
+++ b/lib/libpthread/uthread/uthread_kevent.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: uthread_kevent.c,v 1.2 2001/08/21 19:24:53 fgsch Exp $ */
+/* $OpenBSD: uthread_kevent.c,v 1.3 2001/12/08 17:08:07 fgsch Exp $ */
+
/*-
* Copyright (c) 2000 Jonathan Lemon <jlemon@flugsvamp.com>
* All rights reserved.
@@ -49,7 +50,7 @@ kevent(int kq, const struct kevent *changelist, int nchanges,
rc = _thread_sys_kevent(kq, changelist, nchanges,
eventlist, nevents, &nullts);
- if (rc == 0 && (timeout == NULL ||
+ if (rc == 0 && eventlist != NULL && nevents > 0 && (timeout == NULL ||
timeout->tv_sec != 0 || timeout->tv_nsec != 0)) {
/* Save the socket file descriptor: */
curthread->data.fd.fd = kq;