From 746f950a0befa7e9c2f38a290b7c5b2e335f6f7f Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 1 Nov 2018 23:27:22 -0700 Subject: [PATCH] Remove ifdefs from linux NetworkListener (#1404) --- cscore/src/main/native/linux/NetworkListener.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cscore/src/main/native/linux/NetworkListener.cpp b/cscore/src/main/native/linux/NetworkListener.cpp index c04703a66e..048baa69b6 100644 --- a/cscore/src/main/native/linux/NetworkListener.cpp +++ b/cscore/src/main/native/linux/NetworkListener.cpp @@ -7,7 +7,6 @@ #include "NetworkListener.h" -#ifdef __linux__ #include #include #include @@ -18,7 +17,6 @@ #include #include -#endif #include "Log.h" #include "Notifier.h" @@ -33,9 +31,7 @@ class NetworkListener::Thread : public wpi::SafeThread { wpi::Logger& m_logger; Notifier& m_notifier; -#ifdef __linux__ int m_command_fd = -1; -#endif }; NetworkListener::~NetworkListener() { Stop(); } @@ -46,15 +42,12 @@ void NetworkListener::Stop() { // Wake up thread if (auto thr = m_owner.GetThread()) { thr->m_active = false; -#ifdef __linux__ if (thr->m_command_fd >= 0) eventfd_write(thr->m_command_fd, 1); -#endif } m_owner.Stop(); } void NetworkListener::Thread::Main() { -#ifdef __linux__ // Create event socket so we can be shut down m_command_fd = ::eventfd(0, 0); if (m_command_fd < 0) { @@ -133,5 +126,4 @@ void NetworkListener::Thread::Main() { ::close(sd); ::close(m_command_fd); m_command_fd = -1; -#endif }