In core.sys.linux.epoll.d, struct epoll_event is declared as follows. struct epoll_event { uint events; epoll_data_t data; }; But C declaration is packed in epoll.h as follows. struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ } __attribute__ ((__packed__)); So, I think the declaration must be modified in D as follows. extern(C) align(1) struct epoll_event { align(1): uint events; /* Epoll events */ epoll_data_t data; /* User data variable */ } Because of this mismatch in alignment between C and D, epoll_wait in D reports abnormal event user data.(especially u64). I confirmed this malfunction on code test.
*** This issue has been marked as a duplicate of issue 14702 ***