mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 08:23:34 -05:00
Code style fixes for FreeBSD support pull request.
This commit is contained in:
@@ -122,14 +122,6 @@ elseif (APPLE)
|
|||||||
src/Mem_unix.cpp
|
src/Mem_unix.cpp
|
||||||
src/Platform_mac.cpp
|
src/Platform_mac.cpp
|
||||||
)
|
)
|
||||||
elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
|
||||||
set(SOURCES_OS
|
|
||||||
src/App_unix.cpp
|
|
||||||
src/Cpu_unix.cpp
|
|
||||||
src/Mem_unix.cpp
|
|
||||||
src/Platform_unix.cpp
|
|
||||||
)
|
|
||||||
set(EXTRA_LIBS pthread kvm)
|
|
||||||
else()
|
else()
|
||||||
set(SOURCES_OS
|
set(SOURCES_OS
|
||||||
src/App_unix.cpp
|
src/App_unix.cpp
|
||||||
@@ -141,6 +133,10 @@ else()
|
|||||||
set(EXTRA_LIBS pthread)
|
set(EXTRA_LIBS pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||||
|
set(EXTRA_LIBS ${EXTRA_LIBS} kvm)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(/D__STDC_FORMAT_MACROS)
|
add_definitions(/D__STDC_FORMAT_MACROS)
|
||||||
add_definitions(/DUNICODE)
|
add_definitions(/DUNICODE)
|
||||||
add_definitions(/DRAPIDJSON_SSE2)
|
add_definitions(/DRAPIDJSON_SSE2)
|
||||||
|
|||||||
@@ -20,12 +20,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
# include <sys/cpuset.h>
|
# include <sys/cpuset.h>
|
||||||
# include <pthread_np.h>
|
# include <pthread_np.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -34,10 +38,12 @@
|
|||||||
|
|
||||||
#include "Cpu.h"
|
#include "Cpu.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
typedef cpuset_t cpu_set_t;
|
typedef cpuset_t cpu_set_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void Cpu::init()
|
void Cpu::init()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_NO_LIBCPUID
|
# ifdef XMRIG_NO_LIBCPUID
|
||||||
|
|||||||
Reference in New Issue
Block a user