diff options
Diffstat (limited to 'libbutl/fdstream.hxx')
-rw-r--r-- | libbutl/fdstream.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbutl/fdstream.hxx b/libbutl/fdstream.hxx index 1a8f9a6..59cf2ff 100644 --- a/libbutl/fdstream.hxx +++ b/libbutl/fdstream.hxx @@ -914,11 +914,13 @@ namespace butl { int fd; bool ready; + void* data; // Arbitrary data which can be associated with the descriptor. // Note: intentionally non-explicit to allow implicit initialization when // pushing to fdselect_set. // - fdselect_state (int fd): fd (fd), ready (false) {} + fdselect_state (int fd, void* d = nullptr) + : fd (fd), ready (false), data (d) {} }; using fdselect_set = small_vector<fdselect_state, 4>; |