Skip to content

Commit cbeadd8

Browse files
Copilotjkotas
andcommitted
Fix Windows build: guard CLOCK_MONOTONIC with ifdef
CLOCK_MONOTONIC is a POSIX constant not available on Windows. Guard the assignment with #ifdef to prevent build failures on Windows/WASM builds. Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
1 parent 78a34a7 commit cbeadd8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/mono/mono/utils/mono-time.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ mono_clock_get_time_ns (mono_clock_id_t clk_id)
190190
void
191191
mono_clock_init (mono_clock_id_t *clk_id)
192192
{
193+
#ifdef CLOCK_MONOTONIC
193194
*clk_id = CLOCK_MONOTONIC;
195+
#endif
194196
}
195197

196198
void

0 commit comments

Comments
 (0)