Skip to content

Conversation

@Xvezda
Copy link

@Xvezda Xvezda commented May 12, 2021

Following error occurs on my Mac:

clang -o src/gfx/window.o -c src/gfx/window.c -std=c11 -O3 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-newline-eof -Wno-unused-parameter -Wno-gnu-statement-expression -Wno-gnu-compound-literal-initializer -Wno-gnu-zero-variadic-macro-arguments -Ilib/cglm/include -Ilib/glad/include -Ilib/glfw/include -Ilib/stb -Ilib/noise -fbracket-depth=1024
...
src/gfx/window.c:69:25: error: use of undeclared identifier 'TIME_UTC'
src/gfx/../util/time.h:11:23: note: expanded from macro 'NOW'
    timespec_get(&ts, TIME_UTC);\
                      ^
...
3 warnings and 3 errors generated.
make: *** [src/gfx/window.o] Error 1

Use alternative clock_gettime function to resolve issue.

See: https://en.cppreference.com/w/c/chrono/timespec_get#Notes

Related to #39

Following error occurs on my Mac:

```
clang -o src/gfx/window.o -c src/gfx/window.c -std=c11 -O3 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-newline-eof -Wno-unused-parameter -Wno-gnu-statement-expression -Wno-gnu-compound-literal-initializer -Wno-gnu-zero-variadic-macro-arguments -Ilib/cglm/include -Ilib/glad/include -Ilib/glfw/include -Ilib/stb -Ilib/noise -fbracket-depth=1024
...
src/gfx/window.c:69:25: error: use of undeclared identifier 'TIME_UTC'
src/gfx/../util/time.h:11:23: note: expanded from macro 'NOW'
    timespec_get(&ts, TIME_UTC);\
                      ^
...
3 warnings and 3 errors generated.
make: *** [src/gfx/window.o] Error 1
```

Use alternative `clock_gettime` function to resolve issue.

See: https://en.cppreference.com/w/c/chrono/timespec_get#Notes

Related to jdah#39
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.

1 participant