diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 15:31:53 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 15:31:53 -0400 |
| commit | ca76fb335ae7b3f820beeeed5667950e7489711e (patch) | |
| tree | e0ef48cce92aeeb92241ef98c65bf3af84c05ca4 /src/stdlib/rng.c | |
| parent | 4de0fee8f694503b453e04084caaab55f8670b6c (diff) | |
Add compiler guards for GCC directives
Diffstat (limited to 'src/stdlib/rng.c')
| -rw-r--r-- | src/stdlib/rng.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stdlib/rng.c b/src/stdlib/rng.c index 82dd65d2..0221fa6b 100644 --- a/src/stdlib/rng.c +++ b/src/stdlib/rng.c @@ -24,7 +24,12 @@ struct RNGState_t { uint8_t random_bytes[1024]; }; +#ifdef __TINYC__ +// TinyCC doesn't implement _Thread_local public _Thread_local RNG_t default_rng = (struct RNGState_t[1]){}; +#else +public RNG_t default_rng = (struct RNGState_t[1]){}; +#endif PUREFUNC static Text_t RNG$as_text(const void *rng, bool colorize, const TypeInfo_t*) { |
