From 823ebb1ce35b86ffe2da8af720c65ecc0ab650ed Mon Sep 17 00:00:00 2001 From: zhaoweiliang Date: Wed, 31 Dec 2025 12:06:41 +0800 Subject: [PATCH] fix(ble): fixed build error on ESP32-C5 --- components/bt/controller/esp32c5/bt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/bt/controller/esp32c5/bt.c b/components/bt/controller/esp32c5/bt.c index 6354eb9928..2b1945ccd9 100644 --- a/components/bt/controller/esp32c5/bt.c +++ b/components/bt/controller/esp32c5/bt.c @@ -1606,13 +1606,13 @@ static mbedtls_ecp_keypair keypair; #if CONFIG_BT_LE_SM_SC #include "tinycrypt/cmac_mode.h" #include "tinycrypt/ecc_dh.h" - +#if CONFIG_BT_CONTROLLER_ONLY /* Used by uECC to get random data */ static int ecc_rand_func(uint8_t *dst, unsigned int len) { int offset_cnt = 0; uint8_t *u8ptr = dst; - uint64_t random_64 = 0; + uint64_t random64 = 0; while(len > 0) { random64 = (uint64_t)esp_random(); @@ -1625,7 +1625,7 @@ static int ecc_rand_func(uint8_t *dst, unsigned int len) return 1; } - +#endif // CONFIG_BT_CONTROLLER_ONLY #endif // CONFIG_BT_LE_SM_SC #endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS