mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-16 03:12:45 -05:00
Better compiler name and version handling on Linux and macOS for user-agent string.
This commit is contained in:
@@ -63,9 +63,9 @@ static inline OSVERSIONINFOEX winOsVersion()
|
||||
char *Platform::createUserAgent()
|
||||
{
|
||||
const auto osver = winOsVersion();
|
||||
const size_t max = 160;
|
||||
constexpr const size_t max = 256;
|
||||
|
||||
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);
|
||||
|
||||
# if defined(__x86_64__) || defined(_M_AMD64)
|
||||
|
||||
Reference in New Issue
Block a user