You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/10/15 07:38:05 UTC

(nuttx) 02/02: arch/xtensa/espressif: Include nuttx/kmalloc.h in esp_temperature_sensor.c.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5d8c74452291fd4626d3add363ca0bbe9dc00b1c
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Thu Oct 15 06:56:39 2026 +0200

    arch/xtensa/espressif: Include nuttx/kmalloc.h in esp_temperature_sensor.c.
    
    esp_temperature_sensor_initialize() calls kmm_free(), but the file does
    not include nuttx/kmalloc.h.  It used to come in through stdio.h, which
    no longer includes it, so esp32s3-ws-lcd128:imu-qmi8658 fails to build:
    
      esp_temperature_sensor.c:871:7: error: implicit declaration of
      function 'kmm_free'
    
    Include nuttx/kmalloc.h, as the risc-v copy of the file does.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
 arch/xtensa/src/common/espressif/esp_temperature_sensor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/src/common/espressif/esp_temperature_sensor.c b/arch/xtensa/src/common/espressif/esp_temperature_sensor.c
index 670cd204600..25905ecd92a 100644
--- a/arch/xtensa/src/common/espressif/esp_temperature_sensor.c
+++ b/arch/xtensa/src/common/espressif/esp_temperature_sensor.c
@@ -37,6 +37,7 @@
 #include <errno.h>
 #include <math.h>
 #include <nuttx/debug.h>
+#include <nuttx/kmalloc.h>
 
 #include <arch/board/board.h>
 #include <nuttx/irq.h>