Commit 7ad440ca authored by Max Kellermann's avatar Max Kellermann

net/SocketDescriptor: make eventfd() and signalfd() mandatory on Linux

parent 13b3e9e7
......@@ -18,7 +18,7 @@
*/
#include "config.h"
#ifdef USE_EVENTFD
#ifdef __linux__
#include "EventFD.hxx"
#include "system/Error.hxx"
#include "util/Compiler.h"
......
......@@ -37,15 +37,9 @@
#include <poll.h>
#endif
#ifdef USE_EVENTFD
#ifdef __linux__
#include <sys/eventfd.h>
#endif
#ifdef USE_SIGNALFD
#include <sys/signalfd.h>
#endif
#ifdef __linux__
#include <sys/inotify.h>
#endif
......@@ -222,7 +216,7 @@ FileDescriptor::CheckDuplicate(int new_fd) noexcept
#endif
#ifdef USE_EVENTFD
#ifdef __linux__
bool
FileDescriptor::CreateEventFD(unsigned initval) noexcept
......@@ -231,10 +225,6 @@ FileDescriptor::CreateEventFD(unsigned initval) noexcept
return fd >= 0;
}
#endif
#ifdef USE_SIGNALFD
bool
FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
{
......@@ -246,10 +236,6 @@ FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
return true;
}
#endif
#ifdef __linux__
bool
FileDescriptor::CreateInotify() noexcept
{
......
......@@ -39,7 +39,7 @@
#include <unistd.h>
#include <sys/types.h>
#ifdef USE_SIGNALFD
#ifdef __linux__
#include <signal.h>
#endif
......@@ -181,15 +181,9 @@ public:
bool CheckDuplicate(int new_fd) noexcept;
#endif
#ifdef USE_EVENTFD
#ifdef __linux__
bool CreateEventFD(unsigned initval=0) noexcept;
#endif
#ifdef USE_SIGNALFD
bool CreateSignalFD(const sigset_t *mask) noexcept;
#endif
#ifdef __linux__
bool CreateInotify() noexcept;
#endif
......
......@@ -18,7 +18,7 @@
*/
#include "config.h"
#ifdef USE_SIGNALFD
#ifdef __linux__
#include "SignalFD.hxx"
#include "Error.hxx"
......@@ -43,4 +43,4 @@ SignalFD::Read() noexcept
: -1;
}
#endif /* USE_SIGNALFD */
#endif /* __linux__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment