[PATCH] tests : Makefile change avoiding compiler error for module test

Amit Khatri amit.khatriatsamsung.com
Tue May 27 22:56:27 PDT 2014


WPA Supplicant is giving below error when  "CONFIG_MODULE_TESTS=y" and "CONFIG_P2P=y" in .config file
"wpas_module_tests.c:84: undefined reference to `wps_module_tests'"
This error is coming because "CONFIG_WPS=y" is commented out in .config file but CONFIG_WPS is getting enabled by CONFIG_P2P in Makefile.

Signed-off-by: Amit Khatri <amit.khatri at samsung.com>
---
 wpa_supplicant/Makefile |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index c0913e0..e920cdf 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -639,6 +639,9 @@ OBJS += ../src/wps/wps_attr_process.o
 OBJS += ../src/wps/wps_dev_attr.o
 OBJS += ../src/wps/wps_enrollee.o
 OBJS += ../src/wps/wps_registrar.o
+ifdef CONFIG_MODULE_TESTS
+OBJS += ../src/wps/wps_module_tests.o
+endif
 OBJS_h += ../src/eap_server/eap_server_wsc.o
 CONFIG_IEEE8021X_EAPOL=y
 NEED_DH_GROUPS=y
-- 
1.7.9.5




More information about the Hostap mailing list