Репозитории ALT
S: | 4.8.7-alt25 |
5.1: | 4.6.3-alt1.M51.1 |
4.1: | 4.4.3-alt1.M41.1 |
4.0: | 4.3.4-alt5.M40.1 |
3.0: | 4.0.1-alt1 |
+updates: | 4.0.1-alt2 |
+backports: | 4.2.3-alt7.1.M30 |
Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: aliasing.diff
Скачать
Скачать
--- src/corelib/io/qprocess_unix.cpp
+++ src/corelib/io/qprocess_unix.cpp
@@ -839,10 +839,14 @@ bool QProcessPrivate::processStarted()
qint64 QProcessPrivate::bytesAvailableFromStdout() const
{
- size_t nbytes = 0;
+#if defined (Q_OS_IRIX)
+ off_t nbytes = 0;
+#else
+ int nbytes = 0;
+#endif
qint64 available = 0;
if (::ioctl(stdoutChannel.pipe[0], FIONREAD, (char *) &nbytes) >= 0)
- available = (qint64) *((int *) &nbytes);
+ available = (qint64) nbytes;
#if defined (QPROCESS_DEBUG)
qDebug("QProcessPrivate::bytesAvailableFromStdout() == %lld", available);
#endif
--- src/network/socket/qnativesocketengine_unix.cpp
+++ src/network/socket/qnativesocketengine_unix.cpp
@@ -515,18 +515,18 @@ qint64 QNativeSocketEnginePrivate::nativ
ioctl() to be an int, which is normally 32-bit even on 64-bit
machines.
- IRIX, on the other hand, expects a size_t, which is 64-bit on
+ IRIX, on the other hand, expects a off_t, which is 64-bit on
64-bit machines.
-
- So, the solution is to use size_t initialized to zero to make
- sure all bits are set to zero, preventing underflow with the
- FreeBSD/Linux/Solaris ioctls.
*/
- size_t nbytes = 0;
+#if defined (Q_OS_IRIX)
+ off_t nbytes = 0;
+#else
+ int nbytes = 0;
+#endif
// gives shorter than true amounts on Unix domain sockets.
qint64 available = 0;
if (::ioctl(socketDescriptor, FIONREAD, (char *) &nbytes) >= 0)
- available = (qint64) *((int *) &nbytes);
+ available = (qint64) nbytes;
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeBytesAvailable() == %lli", available);