diff options
author | Jeremy Linton <jeremy.linton@arm.com> | 2016-09-19 04:45:31 -0500 |
---|---|---|
committer | Jeremy Linton <jeremy.linton@arm.com> | 2016-09-19 04:45:31 -0500 |
commit | ac8a3f8bf8395b2e814a888bee15e43c1b2801ed (patch) | |
tree | e62e06e3145335780a363b5f2e806c88e7f3e6ef | |
parent | 845d00d71cc9d6c0488a8178e79d083b9820f4d6 (diff) | |
download | libproxy-git-ac8a3f8bf8395b2e814a888bee15e43c1b2801ed.tar.gz |
Why isn't SO_NOSIGPIPE defined when OSX manpage says its in sys/types.h, sys/socket.h
-rw-r--r-- | libproxy/test/get-pac-test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp index 9aaba8d..2b514e4 100644 --- a/libproxy/test/get-pac-test.cpp +++ b/libproxy/test/get-pac-test.cpp @@ -116,9 +116,11 @@ class TestServer { assert(csock > 0); // OSX/BSD may not have MSG_NOSIGNAL, try SO_NOSIGPIPE instead #ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#ifdef SO_NOSIGPIPE int no_sig_pipe = 1; setsockopt(csock, SOL_SOCKET, SO_NOSIGPIPE, &no_sig_pipe, sizeof(int)); -#define MSG_NOSIGNAL 0 +#endif #endif // Read request |