[PATCH 1/2] wpa_gui-qt4: FTBFS with GCC 4.4: missing #include

Kel Modderman kel at otaku42.de
Sun Nov 9 06:00:00 EST 2008


GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.. -I../../src/utils -I../../src/common -I.moc -I.ui -o .obj/wpagui.o wpagui.cpp
> wpagui.cpp: In constructor 'WpaGui::WpaGui(QWidget*, const char*, Qt::WFlags)':
> wpagui.cpp:98: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'int WpaGui::openCtrlConnection(const char*)':
> wpagui.cpp:212: error: 'printf' was not declared in this scope
> wpagui.cpp:251: error: 'snprintf' was not declared in this scope
> wpagui.cpp:273: error: 'printf' was not declared in this scope
> wpagui.cpp: In function 'void wpa_gui_msg_cb(char*, size_t)':
> wpagui.cpp:330: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual int WpaGui::ctrlRequest(const char*, char*, size_t*)':
> wpagui.cpp:343: error: 'printf' was not declared in this scope
> wpagui.cpp:345: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::helpIndex()':
> wpagui.cpp:545: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::helpContents()':
> wpagui.cpp:551: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::ping()':
> wpagui.cpp:649: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::selectNetwork(const QString&)':
> wpagui.cpp:770: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::enableNetwork(const QString&)':
> wpagui.cpp:791: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::disableNetwork(const QString&)':
> wpagui.cpp:812: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::editNetwork(const QString&)':
> wpagui.cpp:832: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::removeNetwork(const QString&)':
> wpagui.cpp:912: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual int WpaGui::getNetworkDisabled(const QString&)':
> wpagui.cpp:977: error: 'printf' was not declared in this scope
> wpagui.cpp: In member function 'virtual void WpaGui::selectAdapter(const QString&)':
> wpagui.cpp:1067: error: 'printf' was not declared in this scope
> make[2]: *** [.obj/wpagui.o] Error 1

From: Martin Michlmayr <tbm at cyrius.com>
Bug:  http://bugs.debian.org/505041

Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp
@@ -12,6 +12,7 @@
  * See README and COPYING for more details.
  */
 
+#include <cstdio>
 #include <QMessageBox>
 
 #include "networkconfig.h"
--- a/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
@@ -12,6 +12,8 @@
  * See README and COPYING for more details.
  */
 
+#include <cstdio>
+
 #include "scanresults.h"
 #include "wpagui.h"
 #include "networkconfig.h"
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -17,6 +17,7 @@
 #include <unistd.h>
 #endif
 
+#include <cstdio>
 #include <QMessageBox>
 #include <QCloseEvent>
 
---


More information about the HostAP mailing list