Skip to content

fix(esp_libc): add missing stdint include (IDFGH-17572)#18504

Open
KaeLL wants to merge 1 commit into
espressif:masterfrom
KaeLL:fix/missing_stdin_libc_time
Open

fix(esp_libc): add missing stdint include (IDFGH-17572)#18504
KaeLL wants to merge 1 commit into
espressif:masterfrom
KaeLL:fix/missing_stdin_libc_time

Conversation

@KaeLL
Copy link
Copy Markdown
Contributor

@KaeLL KaeLL commented Apr 22, 2026

Motivation

In file included from /esp-idf/components/esp_libc/src/timekeeping.c:20:
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:8:1: error: unknown type name 'uint64_t'
    8 | uint64_t esp_time_impl_get_time(void);
      | ^~~~~~~~
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:1:1: note: 'uint64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
  +++ |+#include <stdint.h>
    1 | /*
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:10:1: error: unknown type name 'uint64_t'
   10 | uint64_t esp_time_impl_get_time_since_boot(void);
      | ^~~~~~~~
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:10:1: note: 'uint64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:12:1: error: unknown type name 'uint32_t'
   12 | uint32_t esp_time_impl_get_time_resolution(void);
      | ^~~~~~~~
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:12:1: note: 'uint32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:14:34: error: unknown type name 'uint64_t'
   14 | void esp_time_impl_set_boot_time(uint64_t t);
      |                                  ^~~~~~~~
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:14:34: note: 'uint64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:16:1: error: unknown type name 'uint64_t'
   16 | uint64_t esp_time_impl_get_boot_time(void);
      | ^~~~~~~~
/esp-idf/components/esp_libc/priv_include/esp_time_impl.h:16:1: note: 'uint64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
/esp-idf/components/esp_libc/src/timekeeping.c: In function 'esp_libc_timekeeping_adjust_boot_time':
/esp-idf/components/esp_libc/src/timekeeping.c:62:13: error: implicit declaration of function 'esp_time_impl_set_boot_time'; did you mean 'esp_time_impl_get_boot_time'? [-Wimplicit-function-declaration]
   62 |             esp_time_impl_set_boot_time(boot_time);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             esp_time_impl_get_boot_time

Note

Low Risk
Low risk: adds a missing standard header include to fix build errors for uint32_t/uint64_t declarations, with no behavioral changes.

Overview
Fixes a compile failure in esp_time_impl.h by adding #include <stdint.h> so the uint32_t/uint64_t timekeeping function declarations are properly typed.

Reviewed by Cursor Bugbot for commit d0772f0. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot changed the title fix(esp_libc): add missing stdint include fix(esp_libc): add missing stdint include (IDFGH-17572) Apr 22, 2026
@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 22, 2026
@SoucheSouche
Copy link
Copy Markdown
Collaborator

Hi @KaeLL, thanks for the contribution. The change looks ok, I will submit it for internal review.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable Resolution: Done Issue is done internally and removed Status: Opened Issue is new Status: Reviewing Issue is being reviewed Resolution: NA Issue resolution is unavailable labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Resolution: Done Issue is done internally Status: Done Issue is done internally

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants