Commit 527d2606 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Port KDE_struct_stat to QT_STATBUF; KDE::stat to QT_STAT

Re-commit this patch from Feb 2015; I was told it caused Konsole to not
build on Mac OSX.  However, it builds now fine on my system.

For Q_OS_MAC only
parent 6fbd138a
......@@ -51,6 +51,7 @@
#if defined(Q_OS_MAC)
#include <libproc.h>
#include <qplatformdefs.h>
#endif
#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
......@@ -890,8 +891,7 @@ private:
int managementInfoBase[4];
size_t mibLength;
struct kinfo_proc* kInfoProc;
/*
KDE_struct_stat statInfo;
QT_STATBUF statInfo;
// Find the tty device of 'pid' (Example: /dev/ttys001)
managementInfoBase[0] = CTL_KERN;
......@@ -914,7 +914,7 @@ private:
const QByteArray deviceName = fullDeviceName.toLatin1();
const char* ttyName = deviceName.data();
if (KDE::stat(ttyName, &statInfo) != 0)
if (QT_STAT(ttyName, &statInfo) != 0)
return false;
// Find all processes attached to ttyName
......@@ -939,8 +939,6 @@ private:
setPid(aPid);
}
return true;
*/
return false;
}
virtual bool readArguments(int aPid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment