Skip to content

unix/mpconfigport: Include time.h to get definition of time_t. #17751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dpgeorge
Copy link
Member

Summary

For some reason macOS builds have just started failing, due to undefined time_t (related to df05cae).

Include "time.h" to fix that.

Testing

CI will test this.

@dpgeorge
Copy link
Member Author

@yoctopuce FYI

Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.38%. Comparing base (8b3439e) to head (6a4306a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17751   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         171      171           
  Lines       22238    22238           
=======================================
  Hits        21879    21879           
  Misses        359      359           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@yoctopuce
Copy link
Contributor

@yoctopuce FYI

Makes sense. I see that <time.h> was included directly in the .c files present in ports/unix, hence the fact that the error did not come out earlier on Linux/windows builds.

@dpgeorge
Copy link
Member Author

I'm not sure if there's any better place to put this. But since typedef time_t mp_timestamp_t; is in py/mpconfig.h it seems prudent to put <time.h> in mpconfigport.h.

@yoctopuce
Copy link
Contributor

I agree, and it shouldn't hurt since this is port specific.

@dpgeorge
Copy link
Member Author

Ah, this was probably due to 9b7d852 which included mpconfig.h in mbedtls_config_common.h.

Without this there's a build error on macOS (at least).  This was likely
due to a combination of 9b7d852 and
df05cae.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the unix-mpconfigport-time-h-include branch from c403bf2 to 6a4306a Compare July 24, 2025 01:43
@dpgeorge dpgeorge merged commit 6a4306a into micropython:master Jul 24, 2025
68 of 69 checks passed
@dpgeorge dpgeorge deleted the unix-mpconfigport-time-h-include branch July 24, 2025 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy