diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fd6a11bca..b49b7529ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,13 +216,19 @@ else( WIN32 ) # Apple AND Linux message( STATUS "Configuring BitShares on OS X" ) set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++ -Wall" ) else( APPLE ) - # Linux Specific Options Here - message( STATUS "Configuring BitShares on Linux" ) + if ( "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" ) + # OpenBSD Specific Options + message( STATUS "Configuring BitShares on OpenBSD" ) + else() + # Linux Specific Options Here + message( STATUS "Configuring BitShares on Linux" ) + set( rt_library rt ) + endif() + # Common Linux & OpenBSD Options set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall" ) if(USE_PROFILER) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" ) endif( USE_PROFILER ) - set( rt_library rt ) set( pthread_library pthread) if ( NOT DEFINED crypto_library ) # I'm not sure why this is here, I guess someone has openssl and can't detect it with find_package()? diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 9a9b98386b..06aebf6fbd 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -1342,6 +1342,8 @@ namespace graphene { namespace net { namespace detail { user_data["fc_git_revision_unix_timestamp"] = fc::git_revision_unix_timestamp; #if defined( __APPLE__ ) user_data["platform"] = "osx"; +#elif defined( __OpenBSD__ ) + user_data["platform"] = "obsd"; #elif defined( __linux__ ) user_data["platform"] = "linux"; #elif defined( _MSC_VER ) diff --git a/tests/cli/main.cpp b/tests/cli/main.cpp index c2c0278a43..ccec5da7e9 100644 --- a/tests/cli/main.cpp +++ b/tests/cli/main.cpp @@ -49,9 +49,10 @@ #include #include #else + #include #include + #include #include - #include #endif #include diff --git a/tests/performance/performance_tests.cpp b/tests/performance/performance_tests.cpp index ae8a94fd77..152f672189 100644 --- a/tests/performance/performance_tests.cpp +++ b/tests/performance/performance_tests.cpp @@ -21,7 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include + +#include + +boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) { + std::srand(time(NULL)); + std::cout << "Random number generator seeded to " << time(NULL) << std::endl; + return nullptr; +} #include @@ -208,11 +215,3 @@ BOOST_AUTO_TEST_CASE( one_hundred_k_benchmark ) } FC_LOG_AND_RETHROW() } BOOST_AUTO_TEST_SUITE_END() - -#include - -boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) { - std::srand(time(NULL)); - std::cout << "Random number generator seeded to " << time(NULL) << std::endl; - return nullptr; -}