OSX build fix

This commit is contained in:
Chris Marsh 2017-08-21 12:51:38 -07:00
parent 4dcb4afd2e
commit 5882823830
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ endif(WIN32)
if(UNIX) if(UNIX)
add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC} connection_unix.cpp) add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC} connection_unix.cpp)
target_link_libraries(discord-rpc PUBLIC pthread) target_link_libraries(discord-rpc PUBLIC pthread)
target_compile_options(discord-rpc PRIVATE -g -Wall) target_compile_options(discord-rpc PRIVATE -g -Wall -std=c++14)
endif(UNIX) endif(UNIX)
target_include_directories(discord-rpc PRIVATE ${RAPIDJSON}/include) target_include_directories(discord-rpc PRIVATE ${RAPIDJSON}/include)

View File

@ -60,7 +60,7 @@ bool BaseConnection::Open()
fcntl(self->sock, F_SETFL, O_NONBLOCK); fcntl(self->sock, F_SETFL, O_NONBLOCK);
#ifdef SO_NOSIGPIPE #ifdef SO_NOSIGPIPE
int optval = 1; int optval = 1;
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)); setsockopt(self->sock, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval));
#endif #endif
for (int pipeNum = 0; pipeNum < 10; ++pipeNum) { for (int pipeNum = 0; pipeNum < 10; ++pipeNum) {