[PATCH] Fixup for "AIOcontextPool: Found io_event with unknown id 0'' error #4434 from urgordeadbeef

This commit is contained in:
proller 2019-02-18 18:54:24 +03:00
parent 15b03f6e12
commit d951df1342

View File

@ -84,7 +84,11 @@ void AIOContextPool::fulfillPromises(const io_event events[], const int num_even
for (const auto & event : boost::make_iterator_range(events, events + num_events))
{
/// get id from event
#if defined(__FreeBSD__)
const auto completed_id = (reinterpret_cast<struct iocb *>(event.udata))->aio_data;
#else
const auto completed_id = event.data;
#endif
/// set value via promise and release it
const auto it = promises.find(completed_id);