Pārlūkot izejas kodu

ssize_t is not defined in visual studio std libs

Anyway, _read and _write return int not ssize_t
Julien Finet 13 gadi atpakaļ
vecāks
revīzija
1765d15ae2

+ 1 - 1
Libs/Core/ctkErrorLogFDMessageHandler.cpp

@@ -170,7 +170,7 @@ void ctkFDHandler::run()
     while(c != '\n')
       {
 #ifdef Q_OS_WIN32
-      ssize_t res = _read(this->Pipe[0], &c, 1); // When used with pipe, read() is blocking
+      int res = _read(this->Pipe[0], &c, 1); // When used with pipe, read() is blocking
 #else
       ssize_t res = read(this->Pipe[0], &c, 1); // When used with pipe, read() is blocking
 #endif

+ 1 - 1
Libs/Core/ctkErrorLogModel.cpp

@@ -159,7 +159,7 @@ void ctkErrorLogTerminalOutput::output(const QString& text)
     QMutexLocker locker(&d->OutputMutex);
     QString textWithNewLine = text + "\n";
 #ifdef _MSC_VER
-    ssize_t res = _write(d->FD, qPrintable(textWithNewLine), textWithNewLine.size());
+    int res = _write(d->FD, qPrintable(textWithNewLine), textWithNewLine.size());
 #else
     ssize_t res = write(d->FD, qPrintable(textWithNewLine), textWithNewLine.size());
 #endif