about summary refs log tree commit diff
path: root/local.c
diff options
context:
space:
mode:
Diffstat (limited to 'local.c')
-rw-r--r--local.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/local.c b/local.c
index ad95a00..a697e15 100644
--- a/local.c
+++ b/local.c
@@ -236,9 +236,11 @@ struct tls *localAccept(int *fd, int bind) {
 	int error = setsockopt(*fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
 	if (error) err(EX_OSERR, "setsockopt");
 
+#ifdef TCP_KEEPIDLE
 	int idle = 15 * 60;
 	error = setsockopt(*fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(idle));
 	if (error) err(EX_OSERR, "setsockopt");
+#endif
 
 	struct tls *client;
 	error = tls_accept_socket(server, &client, *fd);