git: ec9a2f80fcc7 - stable/13 - wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Sun, 21 Nov 2021 01:31:28 UTC
The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec9a2f80fcc7d7b74f6ac50f4e36933e437e15ee

commit ec9a2f80fcc7d7b74f6ac50f4e36933e437e15ee
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-11-10 03:05:03 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-11-21 01:30:49 +0000

    wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build
    
    Reported by:    FreeBSD Build Option Survey
                    https://callfortesting.org/results/bos-2021-11-04/
    Fixes:          c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5
    
    (cherry picked from commit c9516b83c14f2dcec57bd175e418c152a0cec947)
---
 usr.sbin/wpa/Makefile.inc        | 12 ++++++------
 usr.sbin/wpa/src/ap/Makefile     |  9 ++++++---
 usr.sbin/wpa/src/crypto/Makefile |  2 --
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc
index 5c5a6b403225..5ce7dee4d2c5 100644
--- a/usr.sbin/wpa/Makefile.inc
+++ b/usr.sbin/wpa/Makefile.inc
@@ -42,11 +42,6 @@ CFLAGS+=-DCONFIG_IEEE80211R
 CFLAGS+=-DCONFIG_IEEE80211W
 CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"
 CFLAGS+=-DCONFIG_DEBUG_SYSLOG
-CFLAGS+=-DCONFIG_WPS
-CFLAGS+=-DCONFIG_WPS2
-CFLAGS+=-DCONFIG_WPS_UPNP
-CFLAGS+=-DCONFIG_WPS_OOB
-CFLAGS+=-DCONFIG_INTERWORKING
 CFLAGS+=-DPKCS12_FUNCS
 CFLAGS+=-DCONFIG_GAS
 CFLAGS+=-DCONFIG_PEERKEY
@@ -84,7 +79,12 @@ CFLAGS+=-DCONFIG_HS20 \
 	-DEAP_TLS \
 	-DEAP_TTLS \
 	-DEAP_WSC \
-	-DIEEE8021X_EAPOL
+	-DIEEE8021X_EAPOL \
+	-DCONFIG_INTERWORKING \
+	-DCONFIG_WPS \
+	-DCONFIG_WPS2 \
+	-DCONFIG_WPS_UPNP \
+	-DCONFIG_WPS_OOB
 NEED_AES_EAX=y
 NEED_AES_ENCBLOCK=y
 NEED_AES_OMAC1=y
diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile
index 162b8b5444aa..801f45fca8a6 100644
--- a/usr.sbin/wpa/src/ap/Makefile
+++ b/usr.sbin/wpa/src/ap/Makefile
@@ -20,9 +20,7 @@ SRCS=	accounting.c \
 	dfs.c \
 	drv_callbacks.c \
 	eap_user_db.c \
-	gas_serv.c \
 	hostapd.c \
-	hs20.c \
 	ieee802_11_auth.c \
 	ieee802_11_ht.c \
 	ieee802_11_shared.c \
@@ -43,8 +41,13 @@ SRCS=	accounting.c \
 	wnm_ap.c \
 	wpa_auth.c \
 	wpa_auth_glue.c \
-	wpa_auth_ie.c \
+	wpa_auth_ie.c
+
+.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
+SRCS+=	gas_serv.c \
+	hs20.c \
 	wps_hostapd.c
+.endif
 
 CFLAGS+=-DHOSTAPD
 
diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile
index eede671aa7db..d71b740bb816 100644
--- a/usr.sbin/wpa/src/crypto/Makefile
+++ b/usr.sbin/wpa/src/crypto/Makefile
@@ -138,9 +138,7 @@ SRCS+=	dh_group5.c
 SRCS+=	dh_groups.c
 .endif
 
-.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
 SRCS+=	ms_funcs.c
-.endif
 
 CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \
 	-DCONFIG_TLS_INTERNAL_CLIENT \