[OpenWrt-Devel] [PATCH v2 19.07 03/12] hostapd: declare struct wpa_bss early

Petr Štetiar ynezz at true.cz
Wed Nov 6 08:30:22 EST 2019


From: "Leon M. George" <leon at georgemail.eu>

wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
CONFIG_WPS is not defined.  With the later inclusion of
600-ubus_support, the issue manifests in warnings like these:

wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter list will not be visible outside of this definition or declaration
        struct wpa_bss *bss)
               ^~~~~~~

This patch forward declares 'struct wpa_bss' regardless.

Signed-off-by: Leon M. George <leon at georgemail.eu>
[commit message facelift]
Signed-off-by: Petr Štetiar <ynezz at true.cz>
(cherry picked from commit f974f8213b94578581b35e6b3f8fb1fd5a35f753)
---
 .../599-wpa_supplicant-fix-warnings.patch     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch

diff --git a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
new file mode 100644
index 000000000000..e70dc61419da
--- /dev/null
+++ b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
@@ -0,0 +1,19 @@
+--- a/wpa_supplicant/wps_supplicant.h
++++ b/wpa_supplicant/wps_supplicant.h
+@@ -9,6 +9,7 @@
+ #ifndef WPS_SUPPLICANT_H
+ #define WPS_SUPPLICANT_H
+ 
++struct wpa_bss;
+ struct wpa_scan_results;
+ 
+ #ifdef CONFIG_WPS
+@@ -16,8 +17,6 @@ struct wpa_scan_results;
+ #include "wps/wps.h"
+ #include "wps/wps_defs.h"
+ 
+-struct wpa_bss;
+-
+ struct wps_new_ap_settings {
+ 	const char *ssid_hex;
+ 	const char *auth;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list