Skip to content

Commit

Permalink
Make icecream compile on MacOS with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
wdobbe committed Apr 7, 2020
1 parent 102fb91 commit af1f265
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ endif()
# ===========================
# Find required base packages
# ===========================
find_package(Libcap-ng)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_package(Libcap-ng)
endif()
find_package(LZO REQUIRED)
find_package(TAR REQUIRED)
find_package(Zstd REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_executable(iceccd

target_link_libraries(iceccd
icecc
archive
LibArchive::LibArchive
)

if(Libcap-ng_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion services/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ add_library(icecc STATIC
target_link_libraries(icecc
PRIVATE
LZO::lzo
zstd
${ZSTD_LIBRARY}
dl)

if(Libcap-ng_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion services/comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ MsgChannel::MsgChannel(int _fd, struct sockaddr *_a, socklen_t _l, bool text)
maximum_remote_protocol = -1;

int on = 1;
int sec;

if (!setsockopt(_fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on))) {
#if defined( TCP_KEEPIDLE ) || defined( TCPCTL_KEEPIDLE )
Expand All @@ -955,7 +956,6 @@ MsgChannel::MsgChannel(int _fd, struct sockaddr *_a, socklen_t _l, bool text)
int keepidle = TCPCTL_KEEPIDLE;
#endif

int sec;
sec = MAX_SCHEDULER_PING - 3 * MAX_SCHEDULER_PONG;
setsockopt(_fd, IPPROTO_TCP, keepidle, (char *) &sec, sizeof(sec));
#endif
Expand Down

0 comments on commit af1f265

Please sign in to comment.