#include #include int eventfd_read(int fd, eventfd_t *value) { return (sizeof(*value) == read(fd, value, sizeof(*value))) ? 0 : -1; }