{
ldout(m_cct, 5) << "init " << path << dendl;
+ #ifdef _WIN32
+ OSVERSIONINFOEXW ver = {0};
+ ver.dwOSVersionInfoSize = sizeof(ver);
+ get_windows_version(&ver);
+
+ if (std::tie(ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber) <
+ std::make_tuple(10, 0, 17063)) {
+ ldout(m_cct, 5) << "Unix sockets require Windows 10.0.17063 or later. "
+ << "The admin socket will not be available." << dendl;
+ return false;
+ }
+ #endif
+
/* Set up things for the new thread */
std::string err;
int pipe_rd = -1, pipe_wr = -1;
/// collect info from @p uname(2), @p /proc/meminfo and @p /proc/cpuinfo
void collect_sys_info(std::map<std::string, std::string> *m, CephContext *cct);
+#ifdef _WIN32
+/// Retrieve the actual Windows version, regardless of the app manifest.
+int get_windows_version(POSVERSIONINFOEXW ver);
+#endif
+
/// dump service ids grouped by their host to the specified formatter
/// @param f formatter for the output
/// @param services a map from hostname to a list of service id hosted by this host