about summary refs log tree commit diff
path: root/evloop/evloop.h
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2009-02-17 18:35:24 +0100
committerRichard Nyberg <rnyberg@murmeldjur.se>2009-02-17 18:35:24 +0100
commitc94ed423cf2388480c4766c019b6853280ffcbbd (patch)
tree3f11ab4af4bf1bfc8dc5e9f8b8987112c8ad767a /evloop/evloop.h
parent86500486e77860b7418e0bf2d8fa312db2484037 (diff)
downloadbtpd-c94ed423cf2388480c4766c019b6853280ffcbbd.tar.gz
btpd-c94ed423cf2388480c4766c019b6853280ffcbbd.zip
Fix possible crash with kqueue.
With kqueue, a fdev may be in two active kevents.
Diffstat (limited to 'evloop/evloop.h')
-rw-r--r--evloop/evloop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/evloop/evloop.h b/evloop/evloop.h
index 44f8803..28b4572 100644
--- a/evloop/evloop.h
+++ b/evloop/evloop.h
@@ -19,7 +19,12 @@ struct fdev {
     void *arg;
     int fd;
     uint16_t flags;
+#ifdef EVLOOP_EPOLL
     int16_t index;
+#else
+    int16_t rdidx;
+    int16_t wridx;
+#endif
 };
 
 #elif defined(EVLOOP_POLL)