Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Solaris #470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC trantor)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
target_link_libraries(${PROJECT_NAME} PRIVATE network)
elseif (NOT WIN32 AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
target_link_libraries(${PROJECT_NAME} PRIVATE dl)
target_link_libraries(${PROJECT_NAME} PRIVATE dl $<$<PLATFORM_ID:SunOS>:socket>)
elseif (WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE shlwapi)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if [ -f /bin/ninja ]; then
make_program=ninja
cmake_gen='-GNinja'
else
make_flags="$make_flags -j$parallel"
make_flags="$make_flags -j $parallel"
fi

if [ "$1" = "-t" ]; then
Expand Down
3 changes: 1 addition & 2 deletions drogon_ctl/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <trantor/net/Resolver.h>
#include <iostream>

using namespace drogon_ctl;
static const char banner[] =
R"( _
__| |_ __ ___ __ _ ___ _ __
Expand All @@ -28,7 +27,7 @@ static const char banner[] =
|___/
)";

void version::handleCommand(std::vector<std::string> &parameters)
void drogon_ctl::version::handleCommand(std::vector<std::string> &parameters)
{
std::cout << banner << std::endl;
std::cout << "A utility for drogon" << std::endl;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/SharedLibManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void SharedLibManager::managerLibs()
void *oldHandle = nullptr;
if (dlMap_.find(filename) != dlMap_.end())
{
#if defined __linux__ || defined __HAIKU__
#if defined __linux__ || defined __HAIKU__ || defined __sun
if (st.st_mtim.tv_sec >
dlMap_[filename].mTime.tv_sec)
#elif defined _WIN32
Expand Down Expand Up @@ -168,7 +168,7 @@ void SharedLibManager::managerLibs()
dlStat.handle =
compileAndLoadLib(srcFile, oldHandle);
}
#if defined __linux__ || defined __HAIKU__
#if defined __linux__ || defined __HAIKU__ || defined __sun
dlStat.mTime = st.st_mtim;
#elif defined _WIN32
dlStat.mTime.tv_sec = st.st_mtime;
Expand Down Expand Up @@ -236,7 +236,7 @@ void *SharedLibManager::compileAndLoadLib(const std::string &sourceFile,
bool SharedLibManager::shouldCompileLib(const std::string &soFile,
const struct stat &sourceStat)
{
#if defined __linux__ || defined __HAIKU__
#if defined __linux__ || defined __HAIKU__ || defined __sun
auto sourceModifiedTime = sourceStat.st_mtim.tv_sec;
#elif defined _WIN32
auto sourceModifiedTime = sourceStat.st_mtime;
Expand All @@ -251,7 +251,7 @@ bool SharedLibManager::shouldCompileLib(const std::string &soFile,
return true;
}

#if defined __linux__ || defined __HAIKU__
#if defined __linux__ || defined __HAIKU__ || defined __sun
auto soModifiedTime = soStat.st_mtim.tv_sec;
#elif defined _WIN32
auto soModifiedTime = soStat.st_mtime;
Expand Down