Fixed user agent string.
This commit is contained in:
parent
a18fa269a6
commit
9c7468df64
1 changed files with 13 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2025 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2025 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* 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]();
|
char *buf = new char[max]();
|
||||||
int length = snprintf(buf, max, "%s/%s (Windows NT %lu.%lu", APP_NAME, APP_VERSION, osver.dwMajorVersion, osver.dwMinorVersion);
|
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)
|
# if defined(XMRIG_64_BIT)
|
||||||
length += snprintf(buf + length, max - length, "; Win64; x64) libuv/%s", uv_version_string());
|
length += snprintf(buf + length, max - length, "; Win64; "
|
||||||
|
# if defined(XMRIG_ARM)
|
||||||
|
"arm64"
|
||||||
|
# else
|
||||||
|
"x64"
|
||||||
|
# endif
|
||||||
|
") libuv/%s", uv_version_string());
|
||||||
# else
|
# else
|
||||||
length += snprintf(buf + length, max - length, ") libuv/%s", uv_version_string());
|
length += snprintf(buf + length, max - length, ") libuv/%s", uv_version_string());
|
||||||
# endif
|
# 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__);
|
snprintf(buf + length, max - length, " gcc/%d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||||
# elif _MSC_VER
|
# elif _MSC_VER
|
||||||
snprintf(buf + length, max - length, " msvc/%d", MSVC_VERSION);
|
snprintf(buf + length, max - length, " msvc/%d", MSVC_VERSION);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue