aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-21 15:51:08 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-21 21:27:16 -0700
commitd0cf8ce6f43daf6882037dbdcdaa7f2169dd1e6a (patch)
treeb6201f5f27c556b0a8102669605220fffccd4528 /CMakeLists.txt
parent45692d50c33f1fbc45554a5b82281046c4b3621a (diff)
downloadnng-d0cf8ce6f43daf6882037dbdcdaa7f2169dd1e6a.tar.gz
nng-d0cf8ce6f43daf6882037dbdcdaa7f2169dd1e6a.tar.bz2
nng-d0cf8ce6f43daf6882037dbdcdaa7f2169dd1e6a.zip
fixes #469 SO_REUSEADDR should be enabled
fixes #468 TCP nodelay and keepalive should start usable fixes #467 NN_RCVMAXSZ option does not work (compat) fixes #465 Support NN_OPT_TCPNODELAY (compat) This is a rather larger change set than I'd like, but when adding support for legacy TCP keepalive, I found a number if issues using the legacy TCP test (which we are introducing with this commit.) This fixes the concerns that are relevant and addressible. We have elected not to try to support to local address binding at this time, and the IPv6 test case in the old code was wrong, so changes relevant to that are commented out. I've also updated the nng_compat manual page to reflect additional caveats that folks should be aware of, including the previously undocumented caveat around the NN_SNDBUF and NN_RCVBUF options.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf08ca90..96eed693 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -274,6 +274,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions (-DNNG_PLATFORM_POSIX)
add_definitions (-DNNG_PLATFORM_LINUX)
add_definitions (-DNNG_USE_EVENTFD)
+ # Windows subsystem for Linux -- smells like Linux, but it has
+ # some differences (SO_REUSEADDR for one).
+ if (CMAKE_SYSTEM_VERSION MATCHES "Microsoft")
+ add_definitions (-DNNG_PLATFORM_WSL)
+ endif()
set(NNG_PLATFORM_POSIX ON)
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")