diff --git a/wpinet/src/main/native/macOS/MulticastServiceResolver.cpp b/wpinet/src/main/native/macOS/MulticastServiceResolver.cpp index 135a4a3de1..eecf819814 100644 --- a/wpinet/src/main/native/macOS/MulticastServiceResolver.cpp +++ b/wpinet/src/main/native/macOS/MulticastServiceResolver.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#if defined(__APPLE__) + #include "wpinet/MulticastServiceResolver.h" #include @@ -212,3 +214,5 @@ void MulticastServiceResolver::Stop() { pImpl->ResolveStates.clear(); pImpl->serviceRef = nullptr; } + +#endif // defined(__APPLE__) diff --git a/wpinet/src/main/native/macOS/ResolverThread.cpp b/wpinet/src/main/native/macOS/ResolverThread.cpp index c47d1722c9..14526709e1 100644 --- a/wpinet/src/main/native/macOS/ResolverThread.cpp +++ b/wpinet/src/main/native/macOS/ResolverThread.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#if defined(__APPLE__) + #include "ResolverThread.h" #include @@ -109,3 +111,5 @@ std::shared_ptr ResolverThread::Get() { } return locked; } + +#endif // defined(__APPLE__) diff --git a/wpinet/src/main/native/macOS/ResolverThread.h b/wpinet/src/main/native/macOS/ResolverThread.h index 3c4e3d3a0d..158cda832d 100644 --- a/wpinet/src/main/native/macOS/ResolverThread.h +++ b/wpinet/src/main/native/macOS/ResolverThread.h @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#if defined(__APPLE__) + #pragma once #include @@ -44,3 +46,5 @@ class ResolverThread { std::atomic_bool running; }; } // namespace wpi + +#endif // defined(__APPLE__) diff --git a/wpiutil/src/main/native/windows/StackTrace.cpp b/wpiutil/src/main/native/windows/StackTrace.cpp index bab5f83511..de31b2a256 100644 --- a/wpiutil/src/main/native/windows/StackTrace.cpp +++ b/wpiutil/src/main/native/windows/StackTrace.cpp @@ -8,6 +8,8 @@ #include "wpi/ConvertUTF.h" #include "wpi/SmallString.h" +#if defined(_MSC_VER) + namespace { class StackTraceWalker : public StackWalker { public: @@ -40,3 +42,5 @@ std::string GetStackTraceDefault(int offset) { } } // namespace wpi + +#endif // defined(_MSC_VER)