Use has_include to detect esp_random.h

This commit is contained in:
MacDue 2022-03-08 10:48:45 +00:00
parent 2a328b2126
commit 0d45d9c58a
2 changed files with 10 additions and 2 deletions

View File

@ -7,7 +7,11 @@
#include <freertos/FreeRTOS.h>
#include "unity.h"
#include "esp_random.h"
#if __has_include("esp_random.h")
#include "esp_random.h"
#else
#include "esp_system.h"
#endif
#include "esp_encrypted_img.h"
extern const uint8_t rsa_private_pem_start[] asm("_binary_test_rsa_private_key_pem_start");

View File

@ -4,7 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "esp_random.h"
#if __has_include("esp_random.h")
#include "esp_random.h"
#else
#include "esp_system.h"
#endif
#include "randombytes_internal.h"
static const char *randombytes_esp32xx_implementation_name(void)