Skip to content

Fix once_flag symbol collision#257

Merged
shikokuchuo merged 1 commit intomainfrom
threads
Feb 17, 2026
Merged

Fix once_flag symbol collision#257
shikokuchuo merged 1 commit intomainfrom
threads

Conversation

@shikokuchuo
Copy link
Copy Markdown
Member

Fixes #256.

glibc 2.43 added once_flag to <stdlib.h> for C23 compliance, and GCC 15 defaults to -std=gnu23.

#define once_flag pthread_once_t in tinycthread.h turns glibc's
typedef __once_flag once_flag into
typedef __once_flag pthread_once_t, conflicting with the existing
typedef int pthread_once_t.

Fix: replace the macro with a typedef and rename to tct_once_flag / TCT_ONCE_FLAG_INIT, consistent with the tct_ prefix used for all other tinycthread symbols.

@shikokuchuo shikokuchuo merged commit 9125139 into main Feb 17, 2026
24 checks passed
@shikokuchuo shikokuchuo deleted the threads branch February 17, 2026 14:23
Copy link
Copy Markdown
Member Author

@shikokuchuo shikokuchuo left a comment

Choose a reason for hiding this comment

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

Revdepcheck cloud check succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't compile with GCC 15.2.1 20260209

1 participant