Merge pull request #78 from pdavydov108/master

Fix #77 build on freebsd 10
This commit is contained in:
Eric 2015-03-02 20:10:20 +01:00
commit cff940a727
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(-DOS_WINDOWS)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
add_definitions(-DOS_FREEBSD)
endif()
# Set CPU
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86")
add_definitions(-DARCH_X86)

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
#include <sys/resource.h>
#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <iostream>