From 5882823830a26441c4fe9486eb0365553d81d27b Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Mon, 21 Aug 2017 12:51:38 -0700 Subject: [PATCH] OSX build fix --- src/CMakeLists.txt | 2 +- src/connection_unix.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c6f482..c919cc1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,7 +34,7 @@ endif(WIN32) if(UNIX) add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC} connection_unix.cpp) 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) target_include_directories(discord-rpc PRIVATE ${RAPIDJSON}/include) diff --git a/src/connection_unix.cpp b/src/connection_unix.cpp index cb9ff48..a201b60 100644 --- a/src/connection_unix.cpp +++ b/src/connection_unix.cpp @@ -60,7 +60,7 @@ bool BaseConnection::Open() fcntl(self->sock, F_SETFL, O_NONBLOCK); #ifdef SO_NOSIGPIPE int optval = 1; - setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)); + setsockopt(self->sock, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)); #endif for (int pipeNum = 0; pipeNum < 10; ++pipeNum) {