summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index b1298a8..a365b49 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1792,8 +1792,10 @@ TcpSetOptionProc(
const char *optionName, /* Name of the option to set. */
const char *value) /* New value for option. */
{
+#ifdef TCL_FEATURE_KEEPALIVE_NAGLE
SocketInfo *infoPtr;
SOCKET sock;
+#endif
/*
* Check that WinSock is initialized; do not call it if not, to prevent
@@ -1808,10 +1810,10 @@ TcpSetOptionProc(
return TCL_ERROR;
}
+#ifdef TCL_FEATURE_KEEPALIVE_NAGLE
infoPtr = (SocketInfo *) instanceData;
sock = infoPtr->socket;
-#ifdef TCL_FEATURE_KEEPALIVE_NAGLE
if (!strcasecmp(optionName, "-keepalive")) {
BOOL val = FALSE;
int boolVar, rtn;