summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-12-06 14:59:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-06 16:45:52 +0100
commit320b16110f0f9cef032a64846dc792d40ccd367b (patch)
treed18fb2938bbffddbe7bc76d310867a885acb082f /src/corelib/io/qprocess_win.cpp
parent24013d8a875e6279921af00d81e85c1f59731279 (diff)
QProcess: Fix compilation with MinGW
newer mingw-w64 headers do not support swprintf(wchar_t*,wchar_t*, ..) any more. Change-Id: I2fc1fb51ba8d5237149697f77a91abd6469ebb09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index d19ab695ea..780efda7fc 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -82,7 +82,8 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
forever {
// ### The user must make sure to call qsrand() to make the pipe names less predictable.
// ### Replace the call to qrand() with a secure version, once we have it in Qt.
- swprintf(pipeName, L"\\\\.\\pipe\\qt-%X", qrand());
+ swprintf(pipeName, sizeof(pipeName) / sizeof(pipeName[0]),
+ L"\\\\.\\pipe\\qt-%X", qrand());
DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT;
if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)