summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-11-02 22:31:34 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-11-02 22:31:34 +0000
commit22a7eb21aaf6d6858503890bb05c376fd6e37049 (patch)
tree10bcc6b012c404a8f89022f8bdd2c32f1c5c9d52 /src
parenta75ebe0dcc5faeb915cacb0d9db66d2475789116 (diff)
kevent: handle OpenBSD API anomaly, redux
Diffstat (limited to 'src')
-rw-r--r--src/src/tls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/src/tls.c b/src/src/tls.c
index c088c7d85..e6bf1c8d3 100644
--- a/src/src/tls.c
+++ b/src/src/tls.c
@@ -163,6 +163,7 @@ int fd1, fd2, i, cnt = 0;
struct stat sb;
#ifdef OpenBSD
struct kevent k_dummy;
+struct timespec ts = {0};
#endif
errno = 0;
@@ -215,14 +216,13 @@ for (;;)
store_release_above(s+1);
}
-if (kevent(tls_watch_fd, &kev[kev_used-cnt], cnt,
#ifdef OpenBSD
- &k_dummy, 1,
+if (kevent(tls_watch_fd, &kev[kev_used-cnt], cnt, &k_dummy, 1, &ts) >= 0)
+ return TRUE;
#else
- NULL, 0,
-#endif
- NULL) >= 0)
+if (kevent(tls_watch_fd, &kev[kev_used-cnt], cnt, NULL, 0, NULL) >= 0)
return TRUE;
+#endiv
s = US"kevent";
bad: