esp32-idf-sqlite3 icon indicating copy to clipboard operation
esp32-idf-sqlite3 copied to clipboard

Include esp_random.h

Open term-est opened this issue 2 years ago • 1 comments

Fix an issue where a compiler warning (-Wimplicit-function-declaration) causes build breaks. esp_random is used without a declaration, which causes the aforementioned warning

We have a -Werror build and we are using IDF v5, which caused a break in our build, including esp_random should fix that.

From what I understand, "esp_spi_flash" is also deprecated in favor of spi_flash_mmap in IDF v5, and I think it would be good to include "spi_flash_mmap" instead, but I left that out as I don't know if you guys would be willing for that

Thank you, and have a great day!

term-est avatar May 09 '23 14:05 term-est

Hi, I apologize for the late response. Please see this post: https://github.com/siara-cc/esp32-idf-sqlite3/issues/18#issuecomment-1580856926 I don't use ESP-IDF that much and it will take me time to fix it for ESP-IDF 5, so if you think including spi_flash_mmap or spi_flash as mentioned in the above post is recommended, is it possible to update this PR? Also is it possible to make this conditional using #ifdef to support older ESP-IDF versions? I will merge this once I hear back from you. Thanks!

siara-cc avatar Jun 08 '23 02:06 siara-cc