fix(telemetry): fix Windows WinSock.h header ordering in MetricsRegistry test

Pre-include boost/asio/detail/socket_types.hpp on Windows before OTel
SDK headers to ensure WinSock2.h is included before WinSock.h.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-03-31 20:15:46 +01:00
parent f4d327fda7
commit a0eeb8eb9e

View File

@@ -11,6 +11,13 @@
unconditionally.
*/
// On Windows, WinSock2.h must be included before WinSock.h. OTel SDK
// headers transitively pull in WinSock.h, so we pre-include Boost.Asio's
// socket header to establish the correct ordering.
#ifdef _WIN32
#include <boost/asio/detail/socket_types.hpp>
#endif
#include <xrpld/telemetry/MetricsRegistry.h>
#include <xrpl/beast/unit_test.h>