diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 79d8a01217af61c357218dc682ae50ef4ebb2c99..b66e11b272603be7566a39482a5ed028f80273fd 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -1551,7 +1551,7 @@ static QByteArray qNtlmPhase1_SSPI(QAuthenticatorPrivate *ctx)
     ULONG attrs;
 
     secStatus = pSecurityFunctionTable->InitializeSecurityContext(&ctx->ntlmWindowsHandles->credHandle, NULL,
-        L"" /* host */,
+        const_cast<SEC_WCHAR*>(L"") /* host */,
         ISC_REQ_ALLOCATE_MEMORY,
         0, SECURITY_NETWORK_DREP,
         NULL, 0,
@@ -1613,7 +1613,7 @@ static QByteArray qNtlmPhase3_SSPI(QAuthenticatorPrivate *ctx, const QByteArray&
 
     SECURITY_STATUS secStatus = pSecurityFunctionTable->InitializeSecurityContext(&ctx->ntlmWindowsHandles->credHandle,
         &ctx->ntlmWindowsHandles->ctxHandle,
-        L"" /* host */,
+        const_cast<SEC_WCHAR*>(L"") /* host */,
         ISC_REQ_ALLOCATE_MEMORY,
         0, SECURITY_NETWORK_DREP, &type_2_desc,
         0, &ctx->ntlmWindowsHandles->ctxHandle, &type_3_desc,