Skip to content

Commit 0f54d88

Browse files
MaochenWang1danieldegrasse
authored andcommitted
hostap: fix build error when WPS enabled
Fix build error of multiple definition of `dh5_init' in crypto_mbedtls_alt.c when WPS enabled. Signed-off-by: Maochen Wang <[email protected]>
1 parent be4932f commit 0f54d88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/hostap/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,15 @@ zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS
331331
${HOSTAP_SRC_BASE}/wps/wps_enrollee.c
332332
${HOSTAP_SRC_BASE}/wps/wps_registrar.c
333333
${HOSTAP_SRC_BASE}/crypto/dh_groups.c
334+
)
335+
336+
if(NOT CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT)
337+
# dh_group5 is only needed if we are not using mbedtls, as mbedtls provides
338+
# its own definition
339+
zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS
334340
${HOSTAP_SRC_BASE}/crypto/dh_group5.c
335341
)
342+
endif()
336343

337344
zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
338345
CONFIG_P2P

0 commit comments

Comments
 (0)