summaryrefslogtreecommitdiff
path: root/multimedia/vdr-plugin-vnsiserver/files/patch-server.c
blob: b07abaf2986d3996e5ae50f5447cea3f04dd1c61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/server.c
+++ b/server.c
@@ -151,6 +151,7 @@ void cServer::NewClientConnected(int fd)
   int val = 1;
   setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
 
+#ifdef SOL_TCP
   val = 30;
   setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &val, sizeof(val));
 
@@ -162,6 +163,7 @@ void cServer::NewClientConnected(int fd)
 
   val = 1;
   setsockopt(fd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
+#endif
 
   isyslog("VNSI: Client with ID %d connected: %s", m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));
   cConnection *connection = new cConnection(this, fd, m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));