Skip to content

Commit 1f6c140

Browse files
farkasmarkclaude
andcommitted
Fix clock_gettime visibility on Linux with -std=c11
Define _POSIX_C_SOURCE in platform.c on Linux so clock_gettime and CLOCK_MONOTONIC are declared when compiling with strict C11 mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bc54803 commit 1f6c140

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/platform.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if defined(__linux__)
2+
#define _POSIX_C_SOURCE 200112L
3+
#endif
4+
15
#include "platform.h"
26
#include <stdio.h>
37
#include <stdlib.h>

0 commit comments

Comments
 (0)