Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix TCP_KEEPIDLE build failure in FreeBSD.

  • Loading branch information...
commit 4badb227cf10120bd6ab9b432381ec702ccb4d5e 1 parent 5f8f561
@herby herby authored ry committed
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/
8 src/
@@ -1084,13 +1084,11 @@ static Handle<Value> SetKeepAlive(const Arguments& args) {
r = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags));
if ((time > 0)&&(r >= 0)) {
#if defined(__APPLE__)
- // Mac uses a different setting name than Linux
r = setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, (void *)&time, sizeof(time));
-#elif defined(__sun)
- // Solaris doesn't support TCP_KEEPIDLE, so do nothing here
- // assume anything else uses the Linux/BSD method
+#elif defined(__linux__)
r = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&time, sizeof(time));
+ // Solaris nor FreeBSD support TCP_KEEPIDLE, so do nothing here.
if (r < 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.