summaryrefslogtreecommitdiff
path: root/lib/system
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2018-06-07 12:11:30 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-06-10 11:30:24 +0200
commit3f21d8601ddbb27f443f6a8fdf91ebe715d5cb94 (patch)
tree3330c81303acf0130dfd82f63a763b772fae7551 /lib/system
parent05ccb42f8eb197ba4f7244bb4a849c5a4ef028f9 (diff)
downloadgnutls-3f21d8601ddbb27f443f6a8fdf91ebe715d5cb94.tar.gz
Fix warnings seen on OpenCSW Solaris 10
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de> Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/fastopen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/system/fastopen.c b/lib/system/fastopen.c
index 18e82ee446..0f673b7c49 100644
--- a/lib/system/fastopen.c
+++ b/lib/system/fastopen.c
@@ -83,7 +83,7 @@ tfo_writev(gnutls_transport_ptr_t ptr, const giovec_t * iovec, int iovec_cnt)
tfo_st *p = ptr;
int fd = p->fd;
struct msghdr hdr;
- int ret, on = 1;
+ int ret;
memset(&hdr, 0, sizeof(hdr));
hdr.msg_iov = (struct iovec *)iovec;
@@ -94,6 +94,8 @@ tfo_writev(gnutls_transport_ptr_t ptr, const giovec_t * iovec, int iovec_cnt)
# if defined(TCP_FASTOPEN_LINUX)
if (!p->connect_only) {
+ int on = 1;
+
if (setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, &on, sizeof(on)) == -1)
_gnutls_debug_log("Failed to set socket option FASTOPEN\n");