1 From c85ce84d942e1eabde33e120b18e5b1f1637b76e Mon Sep 17 00:00:00 2001
2 From: Nick Hainke <vincent@systemli.org>
3 Date: Tue, 14 Mar 2023 21:40:53 +0100
4 Subject: [PATCH] wpa_supplicant: fix compiling without IEEE8021X_EAPOL
6 If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
9 events.c: In function 'wpa_supplicant_connect':
10 events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
11 1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
12 | ^~~~~~~~~~~~~~~~~~~~~~~
13 events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
14 1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
17 Adding ifdef statements around the calling function fixes the issue.
19 Signed-off-by: Nick Hainke <vincent@systemli.org>
21 wpa_supplicant/events.c | 2 ++
22 1 file changed, 2 insertions(+)
24 --- a/wpa_supplicant/events.c
25 +++ b/wpa_supplicant/events.c
26 @@ -1824,6 +1824,7 @@ int wpa_supplicant_connect(struct wpa_su
27 struct wpa_bss *selected,
28 struct wpa_ssid *ssid)
30 +#ifdef IEEE8021X_EAPOL
31 if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
32 wpas_wps_partner_link_overlap_detect(wpa_s)) ||
33 wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
34 @@ -1846,6 +1847,7 @@ int wpa_supplicant_connect(struct wpa_su
35 #endif /* CONFIG_WPS */
38 +#endif /* IEEE8021X_EAPOL */
40 wpa_msg(wpa_s, MSG_DEBUG,
41 "Considering connect request: reassociate: %d selected: "