diff options
author | Max Kellermann <max@musicpd.org> | 2018-08-22 16:08:07 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-22 16:09:40 +0200 |
commit | fe2f7a3e5adfb6c6f7d235d21c98e15f4408e58a (patch) | |
tree | 2ef2d4b330e43257603b301abcd716bb2875b713 | |
parent | 98eed1f5ab67fae59fb4d152dc6808ff29f31d1f (diff) |
configure.ac: add automake conditional "LINUX"
-rw-r--r-- | Makefile.am | 10 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/system/EpollFD.cxx | 3 | ||||
-rw-r--r-- | src/system/EventFD.cxx | 3 | ||||
-rw-r--r-- | src/system/SignalFD.cxx | 3 |
5 files changed, 8 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index ad9aa5f31..ebc306e77 100644 --- a/Makefile.am +++ b/Makefile.am @@ -617,12 +617,16 @@ libsystem_a_SOURCES = \ src/system/UniqueFileDescriptor.hxx \ src/system/Open.cxx src/system/Open.hxx \ src/system/EventPipe.cxx src/system/EventPipe.hxx \ - src/system/EventFD.cxx src/system/EventFD.hxx \ - src/system/SignalFD.cxx src/system/SignalFD.hxx \ - src/system/EpollFD.cxx src/system/EpollFD.hxx \ src/system/PeriodClock.hxx \ src/system/Clock.cxx src/system/Clock.hxx +if LINUX +libsystem_a_SOURCES += \ + src/system/EventFD.cxx src/system/EventFD.hxx \ + src/system/SignalFD.cxx src/system/SignalFD.hxx \ + src/system/EpollFD.cxx src/system/EpollFD.hxx +endif + # Event loop library libevent_a_SOURCES = \ diff --git a/configure.ac b/configure.ac index fb2a8fcab..1a94b9739 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,7 @@ haiku*) ;; esac +AM_CONDITIONAL([LINUX], [test x$host_is_linux = xyes]) AM_CONDITIONAL([ANDROID], [test x$host_is_android = xyes]) AM_CONDITIONAL([HAVE_WINDOWS], [test x$host_is_windows = xyes]) diff --git a/src/system/EpollFD.cxx b/src/system/EpollFD.cxx index ce0d545ab..c06699527 100644 --- a/src/system/EpollFD.cxx +++ b/src/system/EpollFD.cxx @@ -28,7 +28,6 @@ */ #include "config.h" -#ifdef USE_EPOLL #include "EpollFD.hxx" #include "Error.hxx" @@ -38,5 +37,3 @@ EpollFD::EpollFD() if (!fd.IsDefined()) throw MakeErrno("epoll_create1() failed"); } - -#endif /* USE_EPOLL */ diff --git a/src/system/EventFD.cxx b/src/system/EventFD.cxx index 1c2e65d9d..8aeb0421c 100644 --- a/src/system/EventFD.cxx +++ b/src/system/EventFD.cxx @@ -28,7 +28,6 @@ */ #include "config.h" -#ifdef __linux__ #include "EventFD.hxx" #include "system/Error.hxx" #include "util/Compiler.h" @@ -60,5 +59,3 @@ EventFD::Write() noexcept gcc_unused ssize_t nbytes = fd.Write(&value, sizeof(value)); } - -#endif /* USE_EVENTFD */ diff --git a/src/system/SignalFD.cxx b/src/system/SignalFD.cxx index feea666fc..62af45549 100644 --- a/src/system/SignalFD.cxx +++ b/src/system/SignalFD.cxx @@ -28,7 +28,6 @@ */ #include "config.h" -#ifdef __linux__ #include "SignalFD.hxx" #include "Error.hxx" @@ -52,5 +51,3 @@ SignalFD::Read() noexcept ? info.ssi_signo : -1; } - -#endif /* __linux__ */ |