Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
#include "detachedprocessmonitor.h"
#include <signal.h>
+#include <string.h>
+#include <errno.h>
#include <QtCore/qcoreevent.h>
{
Q_ASSERT(m_pid != 0);
if (::kill(m_pid, 0) < 0) {
- kDebug() << "Process" << m_pid << "finished. kill(2) returned errno:" << perror;
+ kDebug() << "Process" << m_pid << "finished. kill(2) returned errno:" << ::strerror(errno);
killTimer(event->timerId());
m_pid = 0;
emit processFinished();
#ifdef HAVE_UNAME
# include <sys/utsname.h>
+# include <string.h>
+# include <errno.h>
#endif
#include <QtCore/QFile>
#ifdef HAVE_UNAME
struct utsname buf;
if (::uname(&buf) == -1) {
- kDebug() << "call to uname failed" << perror;
+ kDebug() << "call to uname failed" << ::strerror(errno);
} else {
operatingSystem = QString::fromLocal8Bit(buf.sysname) + ' '
+ QString::fromLocal8Bit(buf.release) + ' '