summaryrefslogtreecommitdiff
path: root/vio/viosocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'vio/viosocket.c')
-rw-r--r--vio/viosocket.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 381d028d6a0..f3799351de9 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -391,7 +391,9 @@ my_bool vio_poll_read(Vio *vio,uint timeout)
void vio_timeout(Vio *vio, uint which, uint timeout)
{
#if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO)
+#ifndef DBUG_OFF
int r;
+#endif
DBUG_ENTER("vio_timeout");
{
@@ -405,10 +407,12 @@ void vio_timeout(Vio *vio, uint which, uint timeout)
wait_timeout.tv_usec= 0;
#endif
- r= setsockopt(vio->sd, SOL_SOCKET, which ? SO_SNDTIMEO : SO_RCVTIMEO,
- IF_WIN(const char*, const void*)&wait_timeout,
- sizeof(wait_timeout));
-
+#ifndef DBUG_OFF
+ r=
+#endif
+ setsockopt(vio->sd, SOL_SOCKET, which ? SO_SNDTIMEO : SO_RCVTIMEO,
+ IF_WIN(const char*, const void*)&wait_timeout,
+ sizeof(wait_timeout));
}
#ifndef DBUG_OFF