0
0
Fork 0
mirror of synced 2025-09-23 20:28:30 +00:00

Compare commits

..

1 commit

Author SHA1 Message Date
Tony Butler
3e232029a9
Merge 1ed99453dd into 2619131176 2025-06-25 19:06:48 +07:00
4 changed files with 10 additions and 16 deletions

View file

@ -17,8 +17,6 @@ else()
set(XMRIG_OS_LINUX ON) set(XMRIG_OS_LINUX ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL DragonFly) elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL DragonFly)
set(XMRIG_OS_FREEBSD ON) set(XMRIG_OS_FREEBSD ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
set(XMRIG_OS_OPENBSD ON)
endif() endif()
endif() endif()
@ -45,8 +43,6 @@ elseif(XMRIG_OS_UNIX)
add_definitions(-DXMRIG_OS_LINUX) add_definitions(-DXMRIG_OS_LINUX)
elseif (XMRIG_OS_FREEBSD) elseif (XMRIG_OS_FREEBSD)
add_definitions(-DXMRIG_OS_FREEBSD) add_definitions(-DXMRIG_OS_FREEBSD)
elseif (XMRIG_OS_OPENBSD)
add_definitions(-DXMRIG_OS_OPENBSD)
endif() endif()
endif() endif()

View file

@ -1,6 +1,6 @@
/* XMRig /* XMRig
* Copyright (c) 2018-2025 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2025 XMRig <https://github.com/xmrig>, <support@xmrig.com> * Copyright (c) 2016-2021 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
@ -71,11 +71,11 @@ char *xmrig::Platform::createUserAgent()
#ifndef XMRIG_FEATURE_HWLOC #ifndef XMRIG_FEATURE_HWLOC
#if defined(__DragonFly__) || defined(XMRIG_OS_OPENBSD) #ifdef __DragonFly__
bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id) bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
{ {
return false; return true;
} }
#else #else

View file

@ -1,7 +1,7 @@
/* XMRig /* XMRig
* Copyright (c) 2018 Lee Clagett <https://github.com/vtnerd> * Copyright (c) 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright (c) 2018-2025 SChernykh <https://github.com/SChernykh> * Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2025 XMRig <https://github.com/xmrig>, <support@xmrig.com> * Copyright (c) 2016-2023 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
@ -45,7 +45,7 @@ namespace xmrig {
// https://wiki.openssl.org/index.php/Diffie-Hellman_parameters // https://wiki.openssl.org/index.php/Diffie-Hellman_parameters
#if OPENSSL_VERSION_NUMBER < 0x30000000L || (defined(LIBRESSL_VERSION_NUMBER) && !defined(LIBRESSL_HAS_TLS1_3)) #if OPENSSL_VERSION_NUMBER < 0x30000000L || defined(LIBRESSL_VERSION_NUMBER)
static DH *get_dh2048() static DH *get_dh2048()
{ {
static unsigned char dhp_2048[] = { static unsigned char dhp_2048[] = {
@ -152,7 +152,7 @@ bool xmrig::TlsContext::load(const TlsConfig &config)
SSL_CTX_set_options(m_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); SSL_CTX_set_options(m_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
SSL_CTX_set_options(m_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); SSL_CTX_set_options(m_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
# if OPENSSL_VERSION_NUMBER >= 0x1010100fL || defined(LIBRESSL_HAS_TLS1_3) # if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_max_early_data(m_ctx, 0); SSL_CTX_set_max_early_data(m_ctx, 0);
# endif # endif
@ -180,7 +180,7 @@ bool xmrig::TlsContext::setCipherSuites(const char *ciphersuites)
return true; return true;
} }
# if OPENSSL_VERSION_NUMBER >= 0x1010100fL || defined(LIBRESSL_HAS_TLS1_3) # if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
if (SSL_CTX_set_ciphersuites(m_ctx, ciphersuites) == 1) { if (SSL_CTX_set_ciphersuites(m_ctx, ciphersuites) == 1) {
return true; return true;
} }
@ -194,7 +194,7 @@ bool xmrig::TlsContext::setCipherSuites(const char *ciphersuites)
bool xmrig::TlsContext::setDH(const char *dhparam) bool xmrig::TlsContext::setDH(const char *dhparam)
{ {
# if OPENSSL_VERSION_NUMBER < 0x30000000L || (defined(LIBRESSL_VERSION_NUMBER) && !defined(LIBRESSL_HAS_TLS1_3)) # if OPENSSL_VERSION_NUMBER < 0x30000000L || defined(LIBRESSL_VERSION_NUMBER)
DH *dh = nullptr; DH *dh = nullptr;
if (dhparam != nullptr) { if (dhparam != nullptr) {

View file

@ -64,8 +64,6 @@
# define APP_OS "Linux" # define APP_OS "Linux"
#elif defined XMRIG_OS_FREEBSD #elif defined XMRIG_OS_FREEBSD
# define APP_OS "FreeBSD" # define APP_OS "FreeBSD"
#elif defined XMRIG_OS_OPENBSD
# define APP_OS "OpenBSD"
#else #else
# define APP_OS "Unknown OS" # define APP_OS "Unknown OS"
#endif #endif