# HG changeset patch # User Sebastien Jodogne # Date 1515083948 -3600 # Node ID b4c17acb5dca3e4eadb37d6b486b35c79f1bde24 # Parent 591bfe198944f72d65e59956e3bde76fd4d89b0d sync diff -r 591bfe198944 -r b4c17acb5dca Orthanc/Core/Endianness.h --- a/Orthanc/Core/Endianness.h Thu Jan 04 09:49:38 2018 +0100 +++ b/Orthanc/Core/Endianness.h Thu Jan 04 17:39:08 2018 +0100 @@ -101,6 +101,16 @@ /******************************************************************** + ** OPENBSD ARCHITECTURES + ********************************************************************/ + +#if defined(__OpenBSD__) +# define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1 +# include +#endif + + +/******************************************************************** ** APPLE ARCHITECTURES (including OS X) ********************************************************************/ diff -r 591bfe198944 -r b4c17acb5dca Orthanc/Resources/CMake/Compiler.cmake --- a/Orthanc/Resources/CMake/Compiler.cmake Thu Jan 04 09:49:38 2018 +0100 +++ b/Orthanc/Resources/CMake/Compiler.cmake Thu Jan 04 17:39:08 2018 +0100 @@ -99,8 +99,9 @@ link_libraries(dl) endif() - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") - # The "--as-needed" linker flag is not available on FreeBSD + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND + NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") + # The "--as-needed" linker flag is not available on FreeBSD and OpenBSD set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--as-needed") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")