[PATCH] wpa_gui: fix FTBFS with gcc/g++ 4.7

Stefan Lippers-Hollmann s.L-H
Mon Jul 2 19:17:19 PDT 2012


g++ -c -m64 -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -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++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.. -I../../src -I../../src/utils -I.moc -I.ui -o .obj/wpagui.o wpagui.cpp
wpagui.cpp: In member function 'virtual void WpaGui::parse_argv()':
wpagui.cpp:246:49: error: 'getopt' was not declared in this scope
wpagui.cpp:252:24: error: 'optarg' was not declared in this scope
make[2]: *** [.obj/wpagui.o] Error 1

From: Cyril Brulebois <kibi at debian.org>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h at gmx.de>
intended-for: hostap-1
---
Debian bug #667416, http://bugs.debian.org/667416
successfully built on all Debian architectures:
https://buildd.debian.org/status/logs.php?pkg=wpa&ver=1.0-2

 wpa_supplicant/wpa_gui-qt4/wpagui.cpp |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index 46cfc8f..42e14f0 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -6,16 +6,12 @@
  * See README for more details.
  */
 
-#ifdef __MINGW32__
-/* Need to get getopt() */
-#include <unistd.h>
-#endif
-
 #ifdef CONFIG_NATIVE_WINDOWS
 #include <windows.h>
 #endif /* CONFIG_NATIVE_WINDOWS */
 
 #include <cstdio>
+#include <unistd.h>
 #include <QMessageBox>
 #include <QCloseEvent>
 #include <QImageReader>
-- 
1.7.10




More information about the Hostap mailing list