File MEStatus-5.0.0.30.patch of Package intel-iamt-mestatus

diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/AMTStatusColl.cpp ./src/common/AMTStatus/AMTStatusColl.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/AMTStatusColl.cpp	2008-07-08 12:50:29.000000000 +0200
+++ ./src/common/AMTStatus/AMTStatusColl.cpp	2015-05-22 08:48:02.067100907 +0200
@@ -36,6 +36,7 @@
 #include <memory>
 #include <cstring>
 #include <fstream>
+#include <unistd.h>
 
 const std::string AMTStatusColl::defaultLastAMTCollStateFileName = IATSHAREDDATADIR "/iAMTCollState.dat";
 
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/MEIAMTStatus.cpp ./src/common/AMTStatus/MEIAMTStatus.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/MEIAMTStatus.cpp	2008-07-08 12:50:29.000000000 +0200
+++ ./src/common/AMTStatus/MEIAMTStatus.cpp	2015-05-22 08:46:39.247569511 +0200
@@ -37,6 +37,7 @@
 #include <sstream>
 #include <string>
 #include <iomanip>
+#include <cstdlib>
 
 #define PROVISIONING_STATE_AMT_NOT_DETECTED -1
 #define PROVISIONING_STATE_AMT_DISABLED     -2
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/MEIAMTStatus.h ./src/common/AMTStatus/MEIAMTStatus.h
--- ../orig-MEStatus-5.0.0.30/src/common/AMTStatus/MEIAMTStatus.h	2008-07-08 12:50:29.000000000 +0200
+++ ./src/common/AMTStatus/MEIAMTStatus.h	2015-05-22 08:46:09.002278960 +0200
@@ -38,6 +38,7 @@
 #include "FWULCommand.h"
 #include <string>
 #include <ctime>
+#include <cstdio>
 
 class MEIAMTStatus : public IMEAMTStatus
 {
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/ATVersion.cpp ./src/common/ATVersion.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/ATVersion.cpp	2008-07-08 12:50:29.000000000 +0200
+++ ./src/common/ATVersion.cpp	2015-05-22 08:43:51.464420320 +0200
@@ -40,6 +40,7 @@
 #include <cerrno>
 #include <fstream>
 #include <dirent.h>
+#include <unistd.h>
 
 #define AT_VERSION_ARGUMENT "--version"
 #define AT_VERSION_MAXSIZE 40
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/EventHistory.cpp ./src/common/EventHistory.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/EventHistory.cpp	2008-07-08 12:50:29.000000000 +0200
+++ ./src/common/EventHistory.cpp	2015-05-22 08:42:39.561349290 +0200
@@ -36,6 +36,7 @@
 #include <iostream>
 #include <fstream>
 #include <cstdio>
+#include <cstdlib>
 #include <unistd.h>
 
 namespace ATEvents
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/IPCBufferLinux.cpp ./src/common/IPCBufferLinux.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/IPCBufferLinux.cpp	2008-07-08 12:50:30.000000000 +0200
+++ ./src/common/IPCBufferLinux.cpp	2015-05-22 08:41:44.214995684 +0200
@@ -58,6 +58,7 @@
 #include <cstdio>
 #include <memory>
 #include <cerrno>
+#include <cstring>
 
 #define FAIL -1
 
@@ -112,7 +113,7 @@
 bool IPCBuffer::init(const char *pName, bool bIsOwner, unsigned int nSize, bool bSecure,
 		  unsigned long nAccess /*= IPC_BUF_ACCESS_READ | IPC_BUF_ACCESS_WRITE*/)
 {
-	char *pmp;
+	const char *pmp;
 	int i;
 	int open_flag = 0;
 	int open_mode = 0;
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/IPCiATStatus.cpp ./src/common/IPCiATStatus.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/IPCiATStatus.cpp	2008-07-08 12:50:30.000000000 +0200
+++ ./src/common/IPCiATStatus.cpp	2015-05-22 08:44:34.370247568 +0200
@@ -49,6 +49,7 @@
 #include "IPCiATStatus.h"
 
 #include <string>
+#include <cstring>
 
 const char *IPCiATStatus::BUF_NAME = IATSHAREDDATADIR "/iATStatus";
 
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/TPMStatus/TPMStatusColl.cpp ./src/common/TPMStatus/TPMStatusColl.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/TPMStatus/TPMStatusColl.cpp	2008-07-08 12:50:30.000000000 +0200
+++ ./src/common/TPMStatus/TPMStatusColl.cpp	2015-05-22 08:50:08.760500215 +0200
@@ -37,6 +37,7 @@
 #include <memory>
 #include <cstring>
 #include <fstream>
+#include <unistd.h>
 
 const std::string TPMStatusColl::defaultLastTPMCollStateFileName = IATSHAREDDATADIR "/iTPMCollState.dat";
 
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/common/TPMStatus/TPMStatus.cpp ./src/common/TPMStatus/TPMStatus.cpp
--- ../orig-MEStatus-5.0.0.30/src/common/TPMStatus/TPMStatus.cpp	2008-07-08 12:50:30.000000000 +0200
+++ ./src/common/TPMStatus/TPMStatus.cpp	2015-05-22 08:49:21.174472672 +0200
@@ -44,6 +44,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <netinet/in.h>
+#include <cstring>
 
 // Constructor
 TPMStatus::TPMStatus()
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/MEStatus.cpp ./src/MEStatus.cpp
--- ../orig-MEStatus-5.0.0.30/src/MEStatus.cpp	2008-07-08 12:50:27.000000000 +0200
+++ ./src/MEStatus.cpp	2015-05-22 08:34:35.188720072 +0200
@@ -191,11 +191,11 @@
 			g_snprintf(mestatus_lock_fname, sizeof(mestatus_lock_fname), "/tmp/intel_MEStatus_%s.lock", mydisplay->get_name().c_str());
 			lfd = creat(mestatus_lock_fname, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
 			if (-1 == lfd) {
-				Gtk::MessageDialog::MessageDialog(MESD_RES_ERROR_OPEN_LOCK_FILE, false, Gtk::MESSAGE_ERROR).run();
+				Gtk::MessageDialog(MESD_RES_ERROR_OPEN_LOCK_FILE, false, Gtk::MESSAGE_ERROR).run();
 				return ERROR_INIT_LOCK_FAIL;
 			}
 			if (-1 == flock(lfd, LOCK_EX | LOCK_NB)) {
-				Gtk::MessageDialog::MessageDialog(MESD_RES_ERROR_ANOTHER_INSTANCE, false, Gtk::MESSAGE_ERROR).run();
+				Gtk::MessageDialog(MESD_RES_ERROR_ANOTHER_INSTANCE, false, Gtk::MESSAGE_ERROR).run();
 				return ERROR_INIT_LOCK_FAIL;
 			}
 			mestatus_lock_fd = lfd;
@@ -211,39 +211,39 @@
 		refXml = Gnome::Glade::Xml::create(GLADE_FILE);
 	}
 	catch (Gnome::Glade::XmlError &) {
-		Gtk::MessageDialog::MessageDialog(_("Couldn't load glade file: ") + GLADE_FILE, false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(_("Couldn't load glade file: ") + GLADE_FILE, false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_NO_GLADE_FILE;
 	}
 
 	//Create GUI, but don't initialize it yet.
 	refXml->get_widget_derived("servicesDlg", m_pDialog);
 	if (NULL == m_pDialog) {
-		Gtk::MessageDialog::MessageDialog(_("Couldn't get MEStatusDlg widget"), false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(_("Couldn't get MEStatusDlg widget"), false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_NO_WIDGET;
 	}
 
 	//Create Notification Icon
 	m_pIcon = new MEStatusIcon();
 	if (NULL == m_pIcon) {
-		Gtk::MessageDialog::MessageDialog(_("Failed to create Status Icon object"), false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(_("Failed to create Status Icon object"), false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_ICON_CREAT_FAIL;
 	}
 
 	//Initialize MEStatus Logic
 	if (!m_MEStatusLogic.Init(&m_Config, &m_IMEAMTStatus, m_pDialog, m_pIcon)) {
-		Gtk::MessageDialog::MessageDialog(_("Failed to initialize MEStatus Logic"), false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(_("Failed to initialize MEStatus Logic"), false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_SM_INIT_FAIL;
 	}
 
 	//Initialize GUI
 	Glib::ustring strError;
 	if (!m_pDialog->Init(&m_MEStatusLogic, strError)) {
-		Gtk::MessageDialog::MessageDialog(strError, false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(strError, false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_GUI_INIT_FAIL;
 	}
 	//Initialize Icon
 	if (!m_pIcon->Init(&m_MEStatusLogic, strError)) {
-		Gtk::MessageDialog::MessageDialog(strError, false, Gtk::MESSAGE_ERROR).run();
+		Gtk::MessageDialog(strError, false, Gtk::MESSAGE_ERROR).run();
 		return ERROR_ICON_INIT_FAIL;
 	}
 
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/MEStatusIcon.cpp ./src/MEStatusIcon.cpp
--- ../orig-MEStatus-5.0.0.30/src/MEStatusIcon.cpp	2008-07-08 12:50:28.000000000 +0200
+++ ./src/MEStatusIcon.cpp	2015-05-22 08:37:59.449423684 +0200
@@ -350,7 +350,7 @@
 		return false;
 	}
 
-	notification = notify_notification_new(title, body, NULL, NULL);
+	notification = notify_notification_new(title, body, NULL);
 	if (!notification) {
 		return false;
 	}
@@ -383,11 +383,6 @@
 					       NotificationNASlotCb,
 					       this, NULL);
 	}
-#if GTK_CHECK_VERSION(2, 9, 2)
-#ifndef HAVE_OLD_BUGGY_NOTIFY
-	notify_notification_attach_to_status_icon(notification, m_statusIcon->gobj());
-#endif
-#endif
 	if (!notify_notification_show(notification, NULL)) {
 		if (bAddShow) {
 			notify_notification_clear_actions(notification);
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-MEStatus-5.0.0.30/src/MEStatusLogic.cpp ./src/MEStatusLogic.cpp
--- ../orig-MEStatus-5.0.0.30/src/MEStatusLogic.cpp	2008-07-08 12:50:28.000000000 +0200
+++ ./src/MEStatusLogic.cpp	2015-05-22 08:39:09.160387516 +0200
@@ -251,7 +251,7 @@
 			Gtk::Main::quit();
 		}
 		if (m_modeApp) {
-			Gtk::MessageDialog::MessageDialog(MESD_RES_ERROR_NO_FEAT_ON_SKU, false, Gtk::MESSAGE_ERROR).run();
+			Gtk::MessageDialog(MESD_RES_ERROR_NO_FEAT_ON_SKU, false, Gtk::MESSAGE_ERROR).run();
 		}
 		exit(0);
 	}
openSUSE Build Service is sponsored by