◐ Shell
reader mode source ↗
Skip to content

bpo-45434: Include stdlib.h for specialize stat#29015

Merged
corona10 merged 1 commit into
python:mainfrom
corona10:fix_specialize_stat
Oct 18, 2021
Merged

bpo-45434: Include stdlib.h for specialize stat#29015
corona10 merged 1 commit into
python:mainfrom
corona10:fix_specialize_stat

Conversation

@corona10

@corona10 corona10 commented Oct 18, 2021

Copy link
Copy Markdown
Member

Python/specialize.c:172:71: error: implicit declaration of function 'rand' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    sprintf(buf, "%s%u_%u.txt", dirname, (unsigned)clock(), (unsigned)rand());

https://bugs.python.org/issue45434

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM. Sorry, I didn't test every single way to build Python. I didn't know PRINT_SPECIALIZATION_STATS_TO_FILE macro!

@vstinner

vstinner commented Oct 18, 2021

Copy link
Copy Markdown
Member

@corona10: You can use [bpo-45434](https://bugs.python.org/issue45434): , since it's the issue who introduced the regression, see: commit aac29af.

@corona10 corona10 changed the title no-issue: Include stdlib.h for specialize stat Oct 18, 2021
@corona10 corona10 merged commit fd03917 into python:main Oct 18, 2021
@corona10 corona10 deleted the fix_specialize_stat branch October 18, 2021 08:31
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.

4 participants