Merge pull request #192 from abenedic/master

Minor changes for Building on FreeBSD 12.1
This commit is contained in:
Leonid Stryzhevskyi 2020-01-29 13:13:26 +07:00 committed by GitHub
commit 27c46444db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -248,7 +248,11 @@ if(MSVC)
elseif(APPLE)
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
else(MSVC)
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} atomic)
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
else(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} atomic)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
endif(MSVC)
target_include_directories(oatpp PUBLIC

View File

@ -38,6 +38,9 @@
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <unistd.h>
#if defined(__FreeBSD__)
#include <netinet/in.h>
#endif
#endif
namespace oatpp { namespace network { namespace server {