aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-09-25 12:54:39 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-09-25 14:37:25 +0200
commit642a1b1aa4027501a770725a368dc841e8e12161 (patch)
treed8cf562ad06f257cbf4bab7e8390da6b57c6b088
parentf709c3ac585f7b47317758b8693a6d104b30f951 (diff)
downloadlibssh-642a1b1aa4027501a770725a368dc841e8e12161.tar.gz
libssh-642a1b1aa4027501a770725a368dc841e8e12161.tar.xz
libssh-642a1b1aa4027501a770725a368dc841e8e12161.zip
connect: Fix build warning on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/connect.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connect.c b/src/connect.c
index 69bdf7ef..6c09c3f6 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -220,7 +220,12 @@ static int ssh_connect_ai_timeout(ssh_session session, const char *host,
static int set_tcp_nodelay(socket_t socket)
{
int opt = 1;
- return setsockopt(socket, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
+
+ return setsockopt(socket,
+ IPPROTO_TCP,
+ TCP_NODELAY,
+ (void *)&opt,
+ sizeof(opt));
}
/**