Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undeclared identifier error #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 12, 2021

  1. Fix undeclared identifier error

    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
    Xvezda committed May 12, 2021
    Configuration menu
    Copy the full SHA
    93a8bf8 View commit details
    Browse the repository at this point in the history