diff --git a/src/event/WakeFD.hxx b/src/event/WakeFD.hxx index e26bcaee2..4ed1a23b0 100644 --- a/src/event/WakeFD.hxx +++ b/src/event/WakeFD.hxx @@ -38,7 +38,11 @@ class WakeFD { public: SocketDescriptor GetSocket() const noexcept { +#ifdef USE_EVENTFD + return SocketDescriptor::FromFileDescriptor(fd.Get()); +#else return SocketDescriptor(fd.Get()); +#endif } bool Read() noexcept { diff --git a/src/system/EventFD.hxx b/src/system/EventFD.hxx index 337947472..e7565c890 100644 --- a/src/system/EventFD.hxx +++ b/src/system/EventFD.hxx @@ -44,8 +44,8 @@ public: */ EventFD(); - int Get() const noexcept { - return fd.Get(); + FileDescriptor Get() const noexcept { + return fd; } /**