From 9c7468df645cea561e87c5b086c2afa05c9dd491 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 15 Jun 2025 00:21:23 +0700 Subject: [PATCH] Fixed user agent string. --- src/base/kernel/Platform_win.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/base/kernel/Platform_win.cpp b/src/base/kernel/Platform_win.cpp index 94d1282e..b5973f3d 100644 --- a/src/base/kernel/Platform_win.cpp +++ b/src/base/kernel/Platform_win.cpp @@ -1,6 +1,6 @@ /* XMRig - * Copyright (c) 2018-2023 SChernykh - * Copyright (c) 2016-2023 XMRig , + * Copyright (c) 2018-2025 SChernykh + * Copyright (c) 2016-2025 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,13 +53,21 @@ char *xmrig::Platform::createUserAgent() char *buf = new char[max](); int length = snprintf(buf, max, "%s/%s (Windows NT %lu.%lu", APP_NAME, APP_VERSION, osver.dwMajorVersion, osver.dwMinorVersion); -# if defined(__x86_64__) || defined(_M_AMD64) - length += snprintf(buf + length, max - length, "; Win64; x64) libuv/%s", uv_version_string()); +# if defined(XMRIG_64_BIT) + length += snprintf(buf + length, max - length, "; Win64; " +# if defined(XMRIG_ARM) + "arm64" +# else + "x64" +# endif + ") libuv/%s", uv_version_string()); # else length += snprintf(buf + length, max - length, ") libuv/%s", uv_version_string()); # endif -# ifdef __GNUC__ +# ifdef __clang__ + snprintf(buf + length, max - length, " clang/%d.%d.%d", __clang_major__, __clang_minor__, __clang_patchlevel__); +# elif defined(__GNUC__) snprintf(buf + length, max - length, " gcc/%d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); # elif _MSC_VER snprintf(buf + length, max - length, " msvc/%d", MSVC_VERSION);