From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH] Remove some unsupported socket operations

Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
 netio.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/netio.c b/netio.c
index 2ed9bb1..e0e9962 100644
--- a/netio.c
+++ b/netio.c
@@ -304,7 +304,7 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
 	buffer *writebuf;
 
 #ifndef IOV_MAX
-	#if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
+	#if !defined(UIO_MAXIOV)
 		#define IOV_MAX 1024
 	#elif defined(__sgi)
 		#define IOV_MAX 512 
@@ -469,7 +469,6 @@ int dropbear_listen(const char* address, const char* port,
 	struct addrinfo hints, *res = NULL, *res0 = NULL;
 	int err;
 	unsigned int nsock;
-	struct linger linger;
 	int val;
 	int sock;
 	uint16_t *allocated_lport_p = NULL;
@@ -548,9 +547,6 @@ int dropbear_listen(const char* address, const char* port,
 		val = 1;
 		/* set to reuse, quick timeout */
 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));
-		linger.l_onoff = 1;
-		linger.l_linger = 5;
-		setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&linger, sizeof(linger));
 
 #if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
 		if (res->ai_family == AF_INET6) {
