Skip to content

Commit 7c23d66

Browse files
committed
Enable building the SDK on macOS
1 parent 4118cfd commit 7c23d66

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ if(MSVC)
6060
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/endian)
6161
target_link_libraries(urcl ws2_32)
6262
else()
63+
if(APPLE)
64+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/endian)
65+
endif()
6366
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
6467
target_compile_options(urcl PRIVATE -Wall -Wextra -Wno-unused-parameter)
6568

src/comm/tcp_socket.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ void TCPSocket::setupOptions()
5555
{
5656
int flag = 1;
5757
ur_setsockopt(socket_fd_, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int));
58+
59+
#ifdef TCP_QUICKACK
5860
ur_setsockopt(socket_fd_, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int));
61+
#endif
5962

6063
if (recv_timeout_ != nullptr)
6164
{

0 commit comments

Comments
 (0)