summaryrefslogtreecommitdiff
path: root/chat/loudmouth/patches/patch-loudmouth_lm-sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'chat/loudmouth/patches/patch-loudmouth_lm-sock.c')
-rw-r--r--chat/loudmouth/patches/patch-loudmouth_lm-sock.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/chat/loudmouth/patches/patch-loudmouth_lm-sock.c b/chat/loudmouth/patches/patch-loudmouth_lm-sock.c
new file mode 100644
index 00000000000..39a4e73dc71
--- /dev/null
+++ b/chat/loudmouth/patches/patch-loudmouth_lm-sock.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-loudmouth_lm-sock.c,v 1.1 2014/05/19 09:34:34 jperkin Exp $
+
+Darwin does not have TCP_KEEPIDLE.
+
+--- loudmouth/lm-sock.c.orig 2008-10-29 13:45:10.000000000 +0000
++++ loudmouth/lm-sock.c
+@@ -325,10 +325,12 @@ _lm_sock_set_keepalive (LmSocketT sock,
+ return FALSE;
+ }
+
++#ifndef __APPLE__
+ opt = delay;
+ if (setsockopt (sock, IPPROTO_TCP, TCP_KEEPIDLE, &opt, sizeof (opt)) < 0) {
+ return FALSE;
+ }
++#endif
+
+ opt = delay;
+ if (setsockopt (sock, IPPROTO_TCP, TCP_KEEPINTVL, &opt, sizeof (opt)) < 0) {